BomberUnits
...a Unity learning project
GameStateMachine Class Reference

The GameStateMachine holds the overall program state, transitioning through menu, in-game, paused etc. More...

+ Inheritance diagram for GameStateMachine:
+ Collaboration diagram for GameStateMachine:

Public Member Functions

void MatchStarted ()
 Transition access for external use, set by the MatchManager upon Match start. More...
 
void GameOver ()
 Transition access for external use, set by the MatchManager upon Match end.
 
- Public Member Functions inherited from StateMachine
State GetActiveState ()
 Returns a reference to the currently active state.
 
void TriggerTransition (string transName)
 Overload to enable external transition triggering from current state. More...
 
void TriggerTransition (string fromState, string transName)
 Overload to enable external transition triggering using state and transition names. More...
 
void TriggerTransition (State fromState, string transName)
 Attempts to execute the given transition. More...
 
void UpdateCurrentState (State stateRef)
 Used bu all States to announce themselves as currently active state when entered.
 
void RegisterState (State state)
 Used by all States to register themselves at the SM during startup. More...
 

Additional Inherited Members

- Public Attributes inherited from StateMachine
bool logEnabled
 
- Protected Member Functions inherited from StateMachine
virtual void MyStart ()
 Override to provide an extended Start function for subclasses. Do not override 'Start()' itself!
 
- Protected Attributes inherited from StateMachine
State activeState = null
 Holds a reference to the current active state.
 
Animator controller = null
 Reference to the Unity (Animation) mechanism for SM design.
 

Detailed Description

The GameStateMachine holds the overall program state, transitioning through menu, in-game, paused etc.

For an overview of state and trigger names, see the Unity Animator view of the SM.

Definition at line 9 of file GameStateMachine.cs.

Member Function Documentation

◆ MatchStarted()

void MatchStarted ( )
inline

Transition access for external use, set by the MatchManager upon Match start.

Todo:
: There should be an initial Pre-Match phase, where stuff and clients load.

Definition at line 15 of file GameStateMachine.cs.


The documentation for this class was generated from the following file: