MovingState

MovingState allows the actor to move. It offers support for acceleration and deceleration, as well as a toggle for vertical movement and speed settings on diagonal movement.

Public Methods

Public Members

public const string idString = “Moving”

public MovementSpeed movementProperties

Allows you to set speed, acceleration, and deceleration of the actor. If acceleration and deceleration are 0, the actor will move at full speed immediately upon moving and come to a stop immediately once movement stops.

public bool canMoveVertically

Whether or not the actor can move up and down with the up and down inputs.

public bool willMaintainSpeedOnDiagonal

If true, moving diagonally slows both X and Y movement to keep your overall speed the same.