CocosCreator脚本属性在属性面板的显示
0小编 发布于 2020-04-20 14:07:24
声明属性 要声明属性,需要在 cc.Class 定义的 properties 字段中,填写属性名字和属性参数。 cc.Class({ extends: cc.Component, properties: { score: { default: 0, type:cc.Integer, displayName: "分数", tooltip: "玩家的分数" } } }); :...
小编 发布于 2020-04-20 14:07:24
声明属性 要声明属性,需要在 cc.Class 定义的 properties 字段中,填写属性名字和属性参数。 cc.Class({ extends: cc.Component, properties: { score: { default: 0, type:cc.Integer, displayName: "分数", tooltip: "玩家的分数" } } }); :...