cocos 系统报错, 大佬麻烦你们了

Property “play.properties” must define at least one of “default”, “get” or “set”.

属性“sport.properties”必须至少定义“default”、“get”或“set”中的一个。

这是什么原因??

你定义的是属性

    // foo: {
    //     // ATTRIBUTES:
    //     default: null,        // The default value will be used only when the component attaching
    //                           // to a node for the first time
    //     type: cc.SpriteFrame, // optional, default is typeof default
    //     serializable: true,   // optional, default is true
    // },
    // bar: {
    //     get () {
    //         return this._bar;
    //     },
    //     set (value) {
    //         this._bar = value;
    //     }
    // },

在新建 js 上写了怎么用

1赞

谢谢了