WeaponStates

Allows the player to utilize and access the Player States.

Functions and Accessors | PlayerStates.cs

CurrentState ( WeaponBaseState ) / Public get / Private set

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

_States ( WeaponStateFactory ) / Public get / Private set

Returns all the WeaponStates.

ForceChangeState(WeaponBaseState 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 WeaponStates )

WeaponBaseState myNewState = weaponStates._States.Default();
weaponStates.ForceChangeState(myNewState);

Last updated