Cocos Creator常用API

1.循環播放動畫

// 物體放縮
var toBig = cc.scaleTo(0.8, 0.9);
var toSmall = cc.scaleTo(0.8, 0.7);
this.exGoldButton.runAction(cc.repeatForever(cc.sequence(toBig, toSmall)));
// 箭頭平移
this.YinDaoShouZhi.position = new cc.Vec2(-110, 140);
var action = cc.moveTo(1.1, cc.v2(180, 140));
var repeat = cc.sequence(action, cc.callFunc(() => {
       this.YinDaoShouZhi.position = new cc.Vec2(-110, 140);
            }))
this.YinDaoShouZhi.runAction(cc.repeatForever(repeat));

 

 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章