var Server = cc.Class({
properties: {
typeCount : 34,
allIndex : [],
robert : [Robot],
},
比如说 typeCount要是const的
var Server = cc.Class({
properties: {
typeCount : 34,
allIndex : [],
robert : [Robot],
},
比如说 typeCount要是const的
var Server = cc.Class({
properties: {
typeCount : {
get() {return 34}
},
allIndex : [],
robert : [Robot],
},
toddlxt 是内部人员么, 经常见你啊
不是啊,我是热心的吃瓜群众~
我感觉经常逛论坛能看到很多自己没遇到过的问题,提升得快。看到自己遇到过的问题就顺手解答了。
ES6刚引入的const关键字
用const关键字这么写, 要结合cc.Class