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

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

    • Pipe

      public Pipe(float start, float startSpeed)
  • Method Details

    • changePosition

      public void changePosition(float dt)
      chane the pipes position (as the screen moves along)
      Parameters:
      dt - the time since it last changed
    • respawnPipe

      public void respawnPipe()
      spawns a pipe
    • getPositionBottom

      public com.badlogic.gdx.math.Vector2 getPositionBottom()
      Get the bottom pipe position
      Returns:
      the bottom pipe position
    • getPositionTop

      public com.badlogic.gdx.math.Vector2 getPositionTop()
      Get the top pipe position
      Returns:
      the top pipe position
    • getWidth

      public float getWidth()
      Get the pipes width
      Returns:
      the pipe width
    • getHeightBottom

      public float getHeightBottom()
      Get the bottom pipes height
      Returns:
      the pipe height
    • getHeightTop

      public float getHeightTop()
      Get the top pipes height
      Returns:
      the pipe height
    • getBottomPipe

      public com.badlogic.gdx.math.Rectangle getBottomPipe()
      Get the bottom pipe
      Returns:
      the bottom pipe
    • getTopPipe

      public com.badlogic.gdx.math.Rectangle getTopPipe()
      Get the top pipe
      Returns:
      the top pipe
    • setPosition

      public void setPosition(float x)
      Method for testing