public class AnimatedBox2DSprite extends Box2DSprite
Box2DSprite using an AnimatedSprite for animation.| Modifier and Type | Field and Description |
|---|---|
private net.dermetfan.utils.libgdx.graphics.AnimatedSprite |
animatedSprite
the
AnimatedSprite used for animation |
defaultUserDataAccessor| Constructor and Description |
|---|
AnimatedBox2DSprite(net.dermetfan.utils.libgdx.graphics.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 x,
float y,
float width,
float height,
float rotation)
updates before drawing if isAutoUpdate() is true |
void |
flipFrames(boolean flipX,
boolean flipY) |
void |
flipFrames(boolean flipX,
boolean flipY,
boolean invert) |
void |
flipFrames(float startTime,
float endTime,
boolean flipX,
boolean flipY) |
void |
flipFrames(float startTime,
float endTime,
boolean flipX,
boolean flipY,
boolean invert) |
net.dermetfan.utils.libgdx.graphics.AnimatedSprite |
getAnimatedSprite() |
com.badlogic.gdx.graphics.g2d.Animation |
getAnimation() |
float |
getTime() |
boolean |
isAutoUpdate() |
boolean |
isCenterFrames() |
boolean |
isKeepSize() |
boolean |
isPlaying() |
void |
pause() |
void |
play() |
void |
setAnimatedSprite(net.dermetfan.utils.libgdx.graphics.AnimatedSprite animatedSprite) |
void |
setAnimation(com.badlogic.gdx.graphics.g2d.Animation animation) |
void |
setAutoUpdate(boolean autoUpdate) |
void |
setCenterFrames(boolean centerFrames) |
void |
setKeepSize(boolean keepSize) |
void |
setPlaying(boolean playing) |
void |
setTime(float time) |
void |
stop() |
void |
update()
updates with
Graphics.getDeltaTime() |
void |
update(float delta) |
draw, draw, draw, draw, getUserDataAccessor, getZ, getZComparator, isAdjustHeight, isAdjustWidth, isUseOriginX, isUseOriginY, setAdjustHeight, setAdjustSize, setAdjustWidth, setHeight, setUseOrigin, setUseOriginX, setUseOriginY, setUserDataAccessor, setWidth, setZ, setZComparatordraw, 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.utils.libgdx.graphics.AnimatedSprite animatedSprite
AnimatedSprite used for animationpublic AnimatedBox2DSprite(net.dermetfan.utils.libgdx.graphics.AnimatedSprite animatedSprite)
AnimatedBox2DSprite with the given AnimatedSpriteanimatedSprite - the AnimatedSprite to usepublic void draw(com.badlogic.gdx.graphics.g2d.Batch batch,
float x,
float y,
float width,
float height,
float rotation)
updates before drawing if isAutoUpdate() is truedraw in class Box2DSpritepublic void update()
Graphics.getDeltaTime()update(float)public void update(float delta)
delta - the delta time to update withpublic net.dermetfan.utils.libgdx.graphics.AnimatedSprite getAnimatedSprite()
AnimatedSpritepublic void setAnimatedSprite(net.dermetfan.utils.libgdx.graphics.AnimatedSprite animatedSprite)
animatedSprite - the AnimatedSprite to setpublic void play()
AnimatedSprite.play()public void pause()
AnimatedSprite.pause()public void stop()
AnimatedSprite.stop()public void setTime(float time)
AnimatedSprite.setTime(float)public float getTime()
AnimatedSprite.getTime()public com.badlogic.gdx.graphics.g2d.Animation getAnimation()
AnimatedSprite.getAnimation()public void setAnimation(com.badlogic.gdx.graphics.g2d.Animation animation)
AnimatedSprite.setAnimation(Animation)public void flipFrames(boolean flipX,
boolean flipY)
AnimatedSprite.flipFrames(boolean, boolean)public void flipFrames(boolean flipX,
boolean flipY,
boolean invert)
AnimatedSprite.flipFrames(boolean, boolean, boolean)public void flipFrames(float startTime,
float endTime,
boolean flipX,
boolean flipY)
AnimatedSprite.flipFrames(float, float, boolean, boolean)public void flipFrames(float startTime,
float endTime,
boolean flipX,
boolean flipY,
boolean invert)
AnimatedSprite.flipFrames(float, float, boolean, boolean, boolean)public boolean isPlaying()
AnimatedSprite.isPlaying()public void setPlaying(boolean playing)
AnimatedSprite.setPlaying(boolean)public boolean isAutoUpdate()
AnimatedSprite.isAutoUpdate()public void setAutoUpdate(boolean autoUpdate)
AnimatedSprite.setAutoUpdate(boolean)public boolean isKeepSize()
AnimatedSprite.isKeepSize()public void setKeepSize(boolean keepSize)
AnimatedSprite.setKeepSize(boolean)public boolean isCenterFrames()
AnimatedSprite.isCenterFrames()public void setCenterFrames(boolean centerFrames)
AnimatedSprite.setCenterFrames(boolean)