Class MoveUpdate
java.lang.Object
tech.underoaks.coldcase.state.updates.GameStateUpdate
tech.underoaks.coldcase.state.updates.MoveUpdate
A
GameStateUpdate that moves a TileContent from one location to another.-
Field Summary
Fields inherited from class tech.underoaks.coldcase.state.updates.GameStateUpdate
UPDATE_TYPE -
Constructor Summary
ConstructorsConstructorDescriptionMoveUpdate(com.badlogic.gdx.math.Vector2 sourcePosition, int sourceIndex, com.badlogic.gdx.math.Vector2 targetPosition) Default-Constructor -
Method Summary
Modifier and TypeMethodDescriptionvoidApplies the GameStateUpdate to the game state.static voidsetPlayerRotation(Direction direction) Sets the direction the player is looking towards.
-
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 TileContentsourceIndex- TheVector2-Position of the Content that will be updated.targetPosition- The target position of the TileContent
-
-
Method Details
-
apply
Description copied from class:GameStateUpdateApplies the GameStateUpdate to the game state.- Specified by:
applyin classGameStateUpdate- Parameters:
map- the map that will receive changes.
-
setPlayerRotation
Sets the direction the player is looking towards.- Parameters:
direction- the newDirectionfor the player
-