Class Dawn


public class Dawn extends GameObject
Represents a dawn hazard that damages players after activating.
  • Field Details

    • timeLeftBeforeRemoved

      public float timeLeftBeforeRemoved
  • Constructor Details

    • Dawn

      public Dawn(com.badlogic.gdx.math.Vector2 startPos)
  • Method Details

    • spawnNewDawn

      public static void spawnNewDawn(float delta, GameField gamefield, com.badlogic.gdx.math.Vector2 playerPosition, List<GameObject> gameObjects)
      Spawns a new dawn near the player position.
      Parameters:
      delta - Time delta
      gamefield - Game field for placement
      playerPosition - Player's current position
      gameObjects - List to add dawn to
    • updateDawn

      public boolean updateDawn(float delta)
      Updates dawn state and checks for removal.
      Parameters:
      delta - Time delta
      Returns:
      True if dawn should be removed
    • checkPlayerCollision

      public boolean checkPlayerCollision(Player player)
      Checks collision with player and applies damage.
      Parameters:
      player - The player to check
      Returns:
      True if player was damaged