动作速度控制
local mov1 = cc.MoveBy:create(2,cc.p(300,0))

self.myImage:runAction(cc.EaseIn:create(mov1,3)) --以3倍速度由慢到快
self.myImage:runAction(cc.EaseOut:create(mov1,3)) --以3倍速度由快到慢
self.myImage:runAction(cc.EaseInOut:create(mov1,3)) --先慢到快再快到慢
self.myImage:runAction(cc.EaseSineOut:create(mov1)) 
self.myImage:runAction(cc.EaseExponentialOut:create(mov1))
self.myImage:runAction(cc.Speed:create(mov1,(math.random() * 5))) --随机速度运动

首页 我的博客
粤ICP备17103704号