List of usage examples for com.badlogic.gdx.graphics.g2d Animation getAnimationDuration
public float getAnimationDuration()
From source file:com.github.skittishSloth.openSkies.battles.ships.PlayerShip.java
public TextureRegion getCurrentFrame(final float deltaTime) { final Animation curAnim; switch (bankState) { case NONE:/*from w ww. j a va2s .c om*/ curAnim = baseAnimation; break; case LEFT: curAnim = bankLeft; break; case RIGHT: curAnim = bankRight; break; default: throw new UnsupportedOperationException("Unknown state: " + bankState); } if (movementTime > curAnim.getAnimationDuration()) { movementTime = curAnim.getAnimationDuration(); } return curAnim.getKeyFrame(movementTime); }