up
This commit is contained in:
parent
c81c0f22f2
commit
e6e4d7ae20
|
@ -128,6 +128,8 @@ int main(int argc, char **args) {
|
||||||
|
|
||||||
script_startup();
|
script_startup();
|
||||||
|
|
||||||
|
logout = 0;
|
||||||
|
|
||||||
for (int i = 1; i < argc; i++) {
|
for (int i = 1; i < argc; i++) {
|
||||||
if (args[i][0] == '-') {
|
if (args[i][0] == '-') {
|
||||||
switch (args[i][1]) {
|
switch (args[i][1]) {
|
||||||
|
|
|
@ -962,7 +962,7 @@ var Register = {
|
||||||
},
|
},
|
||||||
|
|
||||||
unregister_obj(obj) {
|
unregister_obj(obj) {
|
||||||
// Log.warn(`Unregister ${JSON.stringify(obj)}`);
|
Log.warn(`Unregister ${JSON.stringify(obj.body)}`);
|
||||||
this.updates = this.updates.filter(x => x[1] !== obj);
|
this.updates = this.updates.filter(x => x[1] !== obj);
|
||||||
this.guis = this.guis.filter(x => x[1] !== obj);
|
this.guis = this.guis.filter(x => x[1] !== obj);
|
||||||
this.nk_guis = this.nk_guis.filter(x => x[1] !== obj);
|
this.nk_guis = this.nk_guis.filter(x => x[1] !== obj);
|
||||||
|
@ -2087,33 +2087,36 @@ var gameobject = {
|
||||||
obj.sync();
|
obj.sync();
|
||||||
obj.defn('components', {});
|
obj.defn('components', {});
|
||||||
|
|
||||||
|
Log.warn(`Made an object with ID ${obj.body}`);
|
||||||
|
|
||||||
cmd(113, obj.body, obj);
|
cmd(113, obj.body, obj);
|
||||||
|
|
||||||
complete_assign(obj, {
|
complete_assign(obj, {
|
||||||
set scale(x) { cmd(36, this.body, x); },
|
set scale(x) {
|
||||||
get scale() { return cmd(103, this.body); },
|
Log.warn(obj.body); cmd(36, obj.body, x); },
|
||||||
get flipx() { return cmd(104,this.body); },
|
get scale() { return cmd(103, obj.body); },
|
||||||
set flipx(x) { cmd(55, this.body, x); },
|
get flipx() { return cmd(104,obj.body); },
|
||||||
get flipy() { return cmd(105,this.body); },
|
set flipx(x) { cmd(55, obj.body, x); },
|
||||||
set flipy(x) { cmd(56, this.body, x); },
|
get flipy() { return cmd(105,obj.body); },
|
||||||
|
set flipy(x) { cmd(56, obj.body, x); },
|
||||||
|
|
||||||
get angle() { return Math.rad2deg(q_body(2,this.body))%360; },
|
get angle() { return Math.rad2deg(q_body(2,obj.body))%360; },
|
||||||
set angle(x) { set_body(0,this.body, Math.deg2rad(x)); },
|
set angle(x) { set_body(0,obj.body, Math.deg2rad(x)); },
|
||||||
|
|
||||||
set pos(x) { set_body(2,this.body,x); },
|
set pos(x) { set_body(2,obj.body,x); },
|
||||||
get pos() { return q_body(1,this.body); },
|
get pos() { return q_body(1,obj.body); },
|
||||||
|
|
||||||
get elasticity() { return cmd(107,this.body); },
|
get elasticity() { return cmd(107,obj.body); },
|
||||||
set elasticity(x) { cmd(106,this.body,x); },
|
set elasticity(x) { cmd(106,obj.body,x); },
|
||||||
|
|
||||||
get friction() { return cmd(109,this.body); },
|
get friction() { return cmd(109,obj.body); },
|
||||||
set friction(x) { cmd(108,this.body,x); },
|
set friction(x) { cmd(108,obj.body,x); },
|
||||||
|
|
||||||
set mass(x) { set_body(7,this.body,x); },
|
set mass(x) { set_body(7,obj.body,x); },
|
||||||
get mass() { return q_body(5, this.body); },
|
get mass() { return q_body(5, obj.body); },
|
||||||
|
|
||||||
set phys(x) { set_body(1, this.body, x); },
|
set phys(x) { set_body(1, obj.body, x); },
|
||||||
get phys() { return q_body(0,this.body); },
|
get phys() { return q_body(0,obj.body); },
|
||||||
});
|
});
|
||||||
|
|
||||||
for (var prop in obj) {
|
for (var prop in obj) {
|
||||||
|
|
Loading…
Reference in a new issue