函数 |
说明 |
备注 |
setPlaytimes(times) |
设置动画播放次数 Set frequency of play
times(Number)次数 number of times
|
无 |
setIndex(index)
|
设置当前动画帧 Set current frame
index(Number)动画帧位置 the order of frame
|
无 |
setXY(x,y)
|
设置动画坐标 Set coordinates of animation
x(Number)x坐标 x-coordinate
y(Number)y坐标 y-coordinate
|
无 |
setSpeed(speed) |
设置动画播放速率 Set the speed of play
speed(Number)间隔速度,越大越慢 interval speed, the larger the slower
|
无 |
start()
|
开始播放动画 Play animation |
无 |
stop() |
停止播放动画 Stop playing animation |
无 |
setBitmaps(bmps) |
为动画重新设置图片 Reset images for animation |
无 |
update()
|
刷新动画 update animation |
此函数需要放进状态机中动画才能有实际效果 This function must be put in statemachine. |
pause() |
动画暂停 Animation pause |
无 |
isFinishd() |
判断动画是否播放完毕 Whether animation ends or not
返回值 bool Return bool
|
无 |
dispose() |
释放动画资源 Free up animation resources |
无 |
disposeMin() |
释放动画索引资源,不释放位图资源 Free up animation index resource but retain image resource |
无 |
setOnFinishAnim(ofa) |
设置动画播放完毕后的回调 Set the callback
ofa(function) 播放完毕要执行的回调函数 the function will be executed after playing
|
无 |
setOnFrameAnim(ofa,frame) |
设置动画在某帧要执行的回调 Set the callback which will execute at a selected frame
ofa(function) 播放到某帧时执行的回调函数 the function will be executed at a selected frame
frame(Number) 具体帧 specific frame
|
无 |
clearFrameAnim() |
清空帧动作回调 Clear callback |
无 |