public class AnimatedBox2DSprite extends Box2DSprite
Box2DSprite using an AnimatedSprite for animation.| Modifier and Type | Field and Description |
|---|---|
private net.dermetfan.gdx.graphics.g2d.AnimatedSprite |
animatedSprite
the
AnimatedSprite used for animation |
defaultUserDataAccessor| Constructor and Description |
|---|
AnimatedBox2DSprite(net.dermetfan.gdx.graphics.g2d.AnimatedSprite animatedSprite)
creates a new
AnimatedBox2DSprite with the given AnimatedSprite |
| Modifier and Type | Method and Description |
|---|---|
void |
draw(com.badlogic.gdx.graphics.g2d.Batch batch,
float box2dX,
float box2dY,
float box2dWidth,
float box2dHeight,
float box2dRotation)
updates before drawing if isAutoUpdate() is true |
void |
flipFrames(boolean flipX,
boolean flipY) |
void |
flipFrames(boolean flipX,
boolean flipY,
boolean set) |
void |
flipFrames(float startTime,
float endTime,
boolean flipX,
boolean flipY) |
void |
flipFrames(float startTime,
float endTime,
boolean flipX,
boolean flipY,
boolean set) |
net.dermetfan.gdx.graphics.g2d.AnimatedSprite |
getAnimatedSprite() |
com.badlogic.gdx.graphics.g2d.Animation |
getAnimation() |
float |
getTime() |
boolean |
isAnimationFinished() |
boolean |
isAutoUpdate() |
boolean |
isCenterFrames() |
boolean |
isPlaying() |
boolean |
isUseFrameRegionSize() |
void |
pause() |
void |
play() |
void |
setAnimatedSprite(net.dermetfan.gdx.graphics.g2d.AnimatedSprite animatedSprite) |
void |
setAnimation(com.badlogic.gdx.graphics.g2d.Animation animation) |
void |
setAutoUpdate(boolean autoUpdate) |
void |
setCenterFrames(boolean centerFrames) |
void |
setPlaying(boolean playing) |
void |
setTime(float time) |
void |
setUseFrameRegionSize(boolean useFrameRegionSize) |
void |
stop() |
void |
update()
updates with
Graphics.getDeltaTime() |
void |
update(float delta) |
draw, draw, draw, draw, getUserDataAccessor, getZComparator, getZIndex, isAdjustHeight, isAdjustWidth, isUseOriginX, isUseOriginY, setAdjustHeight, setAdjustSize, setAdjustWidth, setHeight, setUseOrigin, setUseOriginX, setUseOriginY, setUserDataAccessor, setWidth, setZComparator, setZIndexdraw, draw, flip, getBoundingRectangle, getColor, getHeight, getOriginX, getOriginY, getRotation, getScaleX, getScaleY, getVertices, getWidth, getX, getY, rotate, rotate90, scale, scroll, set, setAlpha, setBounds, setCenter, setCenterX, setCenterY, setColor, setColor, setColor, setFlip, setOrigin, setOriginCenter, setPosition, setRegion, setRotation, setScale, setScale, setSize, setU, setU2, setV, setV2, setX, setY, translate, translateX, translateYgetRegionHeight, getRegionWidth, getRegionX, getRegionY, getTexture, getU, getU2, getV, getV2, isFlipX, isFlipY, setRegion, setRegion, setRegion, setRegion, setRegionHeight, setRegionWidth, setRegionX, setRegionY, setTexture, split, splitprivate net.dermetfan.gdx.graphics.g2d.AnimatedSprite animatedSprite
AnimatedSprite used for animationpublic AnimatedBox2DSprite(net.dermetfan.gdx.graphics.g2d.AnimatedSprite animatedSprite)
AnimatedBox2DSprite with the given AnimatedSpriteanimatedSprite - the AnimatedSprite to usepublic void draw(com.badlogic.gdx.graphics.g2d.Batch batch,
float box2dX,
float box2dY,
float box2dWidth,
float box2dHeight,
float box2dRotation)
updates before drawing if isAutoUpdate() is truedraw in class Box2DSpritebox2dX - the x coordinate (center) of the body or fixturebox2dY - the y coordinate (center) of the body or fixturebox2dWidth - the width of the body or fixturebox2dHeight - the height of the body or fixturebox2dRotation - the rotation of the body or fixturepublic void update()
Graphics.getDeltaTime()update(float)public void update(float delta)
delta - the delta time to update withpublic net.dermetfan.gdx.graphics.g2d.AnimatedSprite getAnimatedSprite()
AnimatedSpritepublic void setAnimatedSprite(net.dermetfan.gdx.graphics.g2d.AnimatedSprite animatedSprite)
animatedSprite - the AnimatedSprite to setpublic com.badlogic.gdx.graphics.g2d.Animation getAnimation()
AnimatedSprite.getAnimation()public void setAnimation(com.badlogic.gdx.graphics.g2d.Animation animation)
AnimatedSprite.setAnimation(Animation)public boolean isUseFrameRegionSize()
AnimatedSprite.isUseFrameRegionSize()public void setUseFrameRegionSize(boolean useFrameRegionSize)
AnimatedSprite.setUseFrameRegionSize(boolean)public void flipFrames(float startTime,
float endTime,
boolean flipX,
boolean flipY,
boolean set)
AnimatedSprite.flipFrames(float, float, boolean, boolean, boolean)public boolean isAnimationFinished()
AnimatedSprite.isAnimationFinished()public void stop()
AnimatedSprite.stop()public boolean isAutoUpdate()
AnimatedSprite.isAutoUpdate()public void setAutoUpdate(boolean autoUpdate)
AnimatedSprite.setAutoUpdate(boolean)public void flipFrames(boolean flipX,
boolean flipY)
AnimatedSprite.flipFrames(boolean, boolean)public boolean isCenterFrames()
AnimatedSprite.isCenterFrames()public void setCenterFrames(boolean centerFrames)
AnimatedSprite.setCenterFrames(boolean)public void flipFrames(float startTime,
float endTime,
boolean flipX,
boolean flipY)
AnimatedSprite.flipFrames(float, float, boolean, boolean)public void play()
AnimatedSprite.play()public float getTime()
AnimatedSprite.getTime()public void setTime(float time)
AnimatedSprite.setTime(float)public void flipFrames(boolean flipX,
boolean flipY,
boolean set)
AnimatedSprite.flipFrames(boolean, boolean, boolean)public void pause()
AnimatedSprite.pause()public boolean isPlaying()
AnimatedSprite.isPlaying()public void setPlaying(boolean playing)
AnimatedSprite.setPlaying(boolean)