Class PlayerAnimationController

java.lang.Object
com.csse3200.game.components.Component
com.csse3200.game.components.player.PlayerAnimationController

public class PlayerAnimationController extends Component
  • Field Details

  • Constructor Details

    • PlayerAnimationController

      public PlayerAnimationController(PlayerActions playerActions)
  • Method Details

    • create

      public void create()
      Description copied from class: Component
      Called when the entity is created and registered. Initial logic such as calls to GetComponent should be made here, not in the constructor which is called before an entity is finished.
      Overrides:
      create in class Component
    • setAnimator

      public void setAnimator(AnimationRenderComponent animator)
    • setTimer

      public void setTimer(GameTime timer)
    • animateStop

      public void animateStop()
      stop the player's current animation and return to idle
    • animateJump

      public void animateJump()
      starts the player's jump animation
    • animateWalk

      public void animateWalk(com.badlogic.gdx.math.Vector2 direction)
      starts the player's walk animation
    • animateCrouching

      public void animateCrouching()
      starts the player's crouching animation
    • revertAnimation

      public void revertAnimation()
      setAnimation: to avoid repeated startup of the same animations
    • setAnimation

      public void setAnimation(String animationName)
      setAnimation: to avoid repeated startup of the same animations
    • animateDash

      public void animateDash()
      starts the player's dash animation
    • animateHurt

      public void animateHurt()
      starts the player's hurt animation
    • animateDeath

      public void animateDeath()
      starts the player's death animation
    • animateSmoke

      public void animateSmoke()
      starts the smoke animation
    • setXDirection

      public void setXDirection(int i)