A class in Root.Township, Alta.PlayerStates.
Test component for player states: inspector buttons fire hurt, die and equipment events, and it puts its state manager into Playing at start.
Constructors
| Member | What it is |
|---|
TestingPlayerStates() | Unity makes components itself; use AddComponent or spawn a prefab instead of new. |
Fields
4 private and internal fields
| Member | What it is |
|---|
private bool isDying | Inspector button that raises Died. |
private bool isEquipment | Inspector button that raises EnteredEquipment. |
private bool isHurting | Inspector button that raises Hurt. |
private PlayerStateManager stateManager | The player state manager to drive. |
Events
| Member | What it is |
|---|
event Action Died | Raised by the Die inspector button. |
event Action EnteredEquipment | Raised by the Equipment inspector button. |
event Action Hurt | Raised by the Hurt inspector button. |
Methods
3 private and internal methods
| Member | What it is |
|---|
private void Awake() | Sets Instance. |
private void OnValidate() | Raises the event for whichever inspector button was pressed. |
private void Start() | Sets the state manager to Playing. |