Class SpawnPositionComponent

java.lang.Object
com.csse3200.game.components.Component
com.csse3200.game.components.enemy.SpawnPositionComponent

public class SpawnPositionComponent extends Component
Simple component that stores an entity's spawn position in world coordinates. Intended as a fixed reference point, not the entity's live position. SpawnPos cannot be mutated by external callers with defensive copying.
  • Constructor Details

    • SpawnPositionComponent

      public SpawnPositionComponent(com.badlogic.gdx.math.Vector2 spawnPos)
      Create a spawn position component
      Parameters:
      spawnPos - the spawn position in world coordinates
  • Method Details

    • getSpawnPos

      public com.badlogic.gdx.math.Vector2 getSpawnPos()
      Returns the spawn position
      Returns:
      a copy of the spawn position in world coordinates