public class HSpriteSheet extends HInteractiveObject
mouseEnabled| 构造器和说明 |
|---|
HSpriteSheet(Bitmap bitmap,
JSONObject data)
用此类创建帧动画。
|
| 限定符和类型 | 方法和说明 |
|---|---|
void |
destroy()
销毁
|
java.lang.String |
getCurrentAnimation()
当前场景
|
int |
getCurrentFrame()
当前帧
|
HRectangle |
getFrameRect()
获取当前帧的外接矩形
|
boolean |
getPaused()
是否暂停状态
|
HPoint |
getSize()
获取尺寸
|
int |
getTotalFrames()
当前animation总共有多少帧
|
void |
gotoAndPlay(int frame)
转到指定帧播放
|
void |
gotoAndPlay(java.lang.String animation,
int frame)
转到指定场景的指定帧播放
|
void |
gotoAndStop(int frame)
跳转到某一帧并停止
|
void |
gotoAndStop(java.lang.String animation,
int frame)
跳转到某个场景的某一帧并停止
|
void |
nextFrame()
下一帧
|
void |
play()
播放
|
void |
preFrame()
上一帧
|
void |
stop()
暂停
|
getBounds, getGlobalMatrix, getHeight, getMatrix, getParent, getRect, getRect, getStage, getWidth, globalToLocal, hitTestObject, hitTestPoint, localToGlobal, setHeight, setMatrix, setWidthaddEventListener, dispatchEvent, hasEventListener, removeEventListenerpublic HSpriteSheet(Bitmap bitmap,
JSONObject data)
bitmap - 一张序列图,安卓中的Bitmap对象data - 动画描述文件public void gotoAndPlay(int frame)
frame - public void gotoAndPlay(java.lang.String animation,
int frame)
animation - frame - public void gotoAndStop(int frame)
frame - public void gotoAndStop(java.lang.String animation,
int frame)
animation - frame - public boolean getPaused()
public void play()
public void stop()
public void nextFrame()
public void preFrame()
public java.lang.String getCurrentAnimation()
public int getCurrentFrame()
public int getTotalFrames()
public HPoint getSize()
getSize 在类中 HDisplayObjectpublic HRectangle getFrameRect()
public void destroy()