mirror of
https://github.com/cocos/cocos4.git
synced 2026-11-20 23:52:40 +08:00
add group for node
This commit is contained in:
@@ -419,6 +419,18 @@ var Node = cc.Class({
|
||||
this._objFlags &= ~DontDestroy;
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
groupIndex: 0,
|
||||
|
||||
group: {
|
||||
get: function () {
|
||||
return cc.game.groupList[this.groupIndex] || '';
|
||||
},
|
||||
|
||||
set: function (value) {
|
||||
this.groupIndex = cc.game.groupList.indexOf(value);
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
Reference in New Issue
Block a user