winColor: {
default: cc.color(),
type: cc.Color,
displayName: ‘大于0分数颜色’
},
在js声明,运行好用,但是编辑器日志会输出
No need to specify the “type” of “GameEnd.winColor” because cc.Color is a child class of ValueType.
怎么声明颜色才合理
![]()
winColor: {
default: cc.color(),
type: cc.Color,
displayName: ‘大于0分数颜色’
},
在js声明,运行好用,但是编辑器日志会输出
No need to specify the “type” of “GameEnd.winColor” because cc.Color is a child class of ValueType.
怎么声明颜色才合理
![]()
把type去掉就好了
type去掉编辑器还知道声明什么类型么
ValueType是编辑器知道的类型,像 cc.color(),cc.v2(),cc.size()
https://github.com/cocos-creator/engine/tree/efe6330ab64803299d3b7fecde039ffed2d9e696/cocos2d/core/value-types