add group for node

This commit is contained in:
2youyouo2
2016-05-09 23:42:55 +08:00
parent 008e6eccc9
commit 91ae92203e
+12
View File
@@ -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);
}
}
},