# WeaponStates

Allows the player to utilize and access the Player States.

### Functions and Accessors | PlayerStates.cs&#x20;

> <mark style="color:orange;">CurrentState ( WeaponBaseState ) / Public get / Private set</mark>
>
> Returns the current state of the state machine ( which inherits from <mark style="color:orange;">WeaponBaseState</mark> )

> <mark style="color:orange;">\_States ( WeaponStateFactory ) / Public get / Private set</mark>
>
> Returns[ ](#playerbasestate.cs)all the WeaponStates.

> <mark style="color:green;">ForceChangeState(WeaponBaseState</mark> <mark style="color:green;"></mark><mark style="color:green;">newState)</mark>
>
> Forces the state machine to switch states.

{% hint style="info" %}
Take a look at an example of implementation for <mark style="color:green;">ForceChangeState</mark> ( Assuming you previously have a reference for WeaponStates )
{% endhint %}

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