关于动作的一些代码

来源:互联网 发布:淘宝卖家最严重的报复 编辑:程序博客网 时间:2024/04/28 14:27

 runAction(action)                   开始运行这个动作 ,返回值仍然这个动作对象

stopAction(action)                   停止这个动作

stopAllAction()                         停止全部动作



var  ac1   =   cc.moveBy()  移动到某位置

var  ac1  =   cc.rotateBy()  旋转至某位置

this.runAction( ac1 , ac2  )              顺序动作演示


var rotateTO = cc.rotateBy(0.5,180)this.runAction(cc.repeatForever(rotateTO))                     //不断地重复旋转

0 0
原创粉丝点击