Class MoveUpdate

java.lang.Object
tech.underoaks.coldcase.state.updates.GameStateUpdate
tech.underoaks.coldcase.state.updates.MoveUpdate

public class MoveUpdate extends GameStateUpdate
A GameStateUpdate that moves a TileContent from one location to another.
  • Constructor Details

    • MoveUpdate

      public MoveUpdate(com.badlogic.gdx.math.Vector2 sourcePosition, int sourceIndex, com.badlogic.gdx.math.Vector2 targetPosition)
      Default-Constructor
      Parameters:
      sourcePosition - The origin position of the TileContent
      sourceIndex - The Vector2-Position of the Content that will be updated.
      targetPosition - The target position of the TileContent
  • Method Details

    • apply

      public void apply(Map map)
      Description copied from class: GameStateUpdate
      Applies the GameStateUpdate to the game state.
      Specified by:
      apply in class GameStateUpdate
      Parameters:
      map - the map that will receive changes.
    • setPlayerRotation

      public static void setPlayerRotation(Direction direction)
      Sets the direction the player is looking towards.
      Parameters:
      direction - the new Direction for the player