Skip to content

Commit

Permalink
Merge pull request cocos#69 from dumganhar/v3.3.0-native
Browse files Browse the repository at this point in the history
Bind _name, _objFlags, remove unused code _childArrivalOrder
  • Loading branch information
minggo authored Nov 2, 2021
2 parents 3cb5327 + dc1a21b commit eb1644f
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 2 deletions.
21 changes: 21 additions & 0 deletions cocos/core/assets/asset.jsb.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,27 @@ const _descriptor$1 = _applyDecoratedDescriptor(_class2$1.prototype, '_native',
return '';
},
});

//cjh FIXME: replace object.ts with object.jsb.ts
_applyDecoratedDescriptor(_class2$1.prototype, '_name', [serializable], {
configurable: true,
enumerable: true,
writable: true,
initializer: function initializer () {
return '';
},
});

_applyDecoratedDescriptor(_class2$1.prototype, '_objFlags', [serializable], {
configurable: true,
enumerable: true,
writable: true,
initializer: function initializer () {
return 0;
},
});
//

_applyDecoratedDescriptor(_class2$1.prototype, '_nativeAsset', [property], Object.getOwnPropertyDescriptor(_class2$1.prototype, '_nativeAsset'), _class2$1.prototype);

clsDecorator(Asset);
Expand Down
2 changes: 1 addition & 1 deletion cocos/core/scene-graph/node-activator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,7 @@ export default class NodeActivator {
--originCount;
}
}
node._childArrivalOrder = node._children.length;

// activate children recursively
for (let i = 0, len = node._children.length; i < len; ++i) {
const child = node._children[i];
Expand Down
22 changes: 21 additions & 1 deletion cocos/core/scene-graph/node.jsb.ts
Original file line number Diff line number Diff line change
Expand Up @@ -717,7 +717,27 @@ nodeProto.removeAllChildren = function () {
};

// Deserialization
const _class2$u = Node;

//cjh FIXME: replace object.ts with object.jsb.ts
_applyDecoratedDescriptor(_class2$u.prototype, '_name', [serializable], {
configurable: true,
enumerable: true,
writable: true,
initializer: function initializer () {
return '';
},
});

_applyDecoratedDescriptor(_class2$u.prototype, '_objFlags', [serializable], {
configurable: true,
enumerable: true,
writable: true,
initializer: function initializer () {
return 0;
},
});
//

const _descriptor$o = _applyDecoratedDescriptor(_class2$u.prototype, '_parent', [serializable], {
configurable: true,
enumerable: true,
Expand Down

0 comments on commit eb1644f

Please sign in to comment.