java.lang.Object
com.csse3200.game.minigames.birdiedash.entities.Bird

public class Bird extends Object
Class for the bird in the mini-game birdie dash
  • Constructor Details

    • Bird

      public Bird(float x, float y)
  • Method Details

    • update

      public void update(float deltaTime, float multiplier)
      Updates the birds position and adjusts velocity as needed
      Parameters:
      deltaTime - the time from the last position update
      multiplier - Used to speed up the game
    • setCollidingTopPipe

      public void setCollidingTopPipe(float y)
      Method to set that the bird is colliding with the top of a pipe
      Parameters:
      y - the y position
    • isCollideTopOfPipe

      public boolean isCollideTopOfPipe()
      Used for testing
    • unsetCollidingTopPipe

      public void unsetCollidingTopPipe()
      Method to unset the bird is colliding with a pipe
    • setCollidingBottomPipe

      public void setCollidingBottomPipe(float y)
      Method to set that the bird is colliding with the bottom of a pipe
      Parameters:
      y - the y position
    • setCollidingPipe

      public void setCollidingPipe()
      For collisions
    • isCollidingPipe

      public boolean isCollidingPipe()
      For testing
    • getBirdHeight

      public float getBirdHeight()
      Gets the birds height
      Returns:
      the birds height
    • unsetCollidingPipe

      public void unsetCollidingPipe()
      For collisions.
    • flap

      public void flap()
      Flag to move bird
    • getPosition

      public com.badlogic.gdx.math.Vector2 getPosition()
      Returns the birds position
      Returns:
      the birds position
    • getBoundingBox

      public com.badlogic.gdx.math.Rectangle getBoundingBox()
      Returns the birds bounding box
      Returns:
      the birds bounding box
    • touchingFloor

      public Boolean touchingFloor()
      Determines if the bird is touching or past the ground
      Returns:
      true if bird it touching the ground, otherwise false
    • setPosition

      public void setPosition(float x, float y)
      Used for testing
    • setVelocity

      public void setVelocity(float x, float y)
      For testing
    • getVelocity

      public com.badlogic.gdx.math.Vector2 getVelocity()
      For Testing
      Returns:
      The velocity vector
    • birdFalling

      public Boolean birdFalling()
      Determines if the bird is falling
      Returns:
      isFalling