cc.Class({ extends: cc.Component, properties: { // 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; // } // }, }, // LIFE-CYCLE CALLBACKS: // onLoad () {}, start () { this.playScale(); }, playScale(){ // console.log("play"); this.node.stopAllActions(); var s = cc.sequence(cc.scaleTo(0.5, 1.5),cc.scaleTo(0.5, 1)); var repeat = cc.repeatForever(s); this.node.runAction(repeat); var s1 = cc.sequence(cc.rotateTo(0.1, -5),cc.rotateTo(0.1, 5)); var r = cc.repeatForever(s1); this.node.runAction(r); } });