proper proto chaining in ur construction

This commit is contained in:
2023-10-05 18:33:43 +00:00
parent 8c69dfd71f
commit 03f209ddef
14 changed files with 163 additions and 102 deletions

View File

@@ -702,10 +702,14 @@ component.circle2d = Object.copy(collider2d, {
make(go) {
var circle = Object.create(this);
circle.gameobject = go;
Object.assign(circle, make_circle2d(go.body));
Object.mixin(circle,this.impl);
Object.hide(circle, 'gameobject', 'id', 'shape', 'scale');
for (var key in this.impl)
if (this[key]) circle[key] = this[key];
return circle;
},
});