PlayerStates

Allows the player to utilize and access the Player States.

Functions and Accessors | PlayerStates.cs

CurrentState ( PlayerBaseState ) / Public get / Private set

Returns the current state of the state machine ( which inherits from PlayerBaseState )

_States ( PlayerStateFactory ) / Public get / Private set

Returns all the PlayerStates.

ForceChangeState(PlayerBaseState newState)

Forces the state machine to switch states.

Take a look at an example of implementation for ForceChangeState ( Assuming you previously have a reference for PlayerStates )

PlayerBaseState myNewState = playerStates._States.Default();
playerStates.ForceChangeState(myNewState);

Last updated