Class GameEntityChangeEvent

All Implemented Interfaces:
Serializable

public class GameEntityChangeEvent extends GameEntityEvent
Instances of this class are sent game entity is changed
See Also:
  • Field Details

  • Constructor Details

    • GameEntityChangeEvent

      public GameEntityChangeEvent(Object source, Entity entity)
      Constructs new GameEntityChangeEvent
    • GameEntityChangeEvent

      public GameEntityChangeEvent(Object source, Entity entity, Vector<UnitLocation> movePath)
      Constructs new GameEntityChangeEvent
    • GameEntityChangeEvent

      public GameEntityChangeEvent(Object source, Entity entity, Vector<UnitLocation> movePath, Entity oldEntity)
      Constructs new GameEntityChangeEvent, storing the entity prior to changes. This old entity may be needed in certain cases, like when a Dropship is taking off, since some of the old state is important.
  • Method Details

    • getMovePath

      public Vector<UnitLocation> getMovePath()
      Returns:
      the movePath.
    • getOldEntity

      public Entity getOldEntity()
    • toString

      public String toString()
      Overrides:
      toString in class GameEvent
    • fireEvent

      public void fireEvent(GameListener gl)
      Description copied from class: GameEvent
      Sub-classed events implement this method to call their specific method on a GameListener instance that their event has been fired.
      Specified by:
      fireEvent in class GameEvent
      Parameters:
      gl - GameListener recipient.
    • getEventName

      public String getEventName()
      Specified by:
      getEventName in class GameEvent