BomberUnits
...a Unity learning project
MainMenuStateMachine Class Reference

The MainMenu state machine provides the logic behind switching the menu pages and provides callbacks for actions required from the states. More...

+ Inheritance diagram for MainMenuStateMachine:
+ Collaboration diagram for MainMenuStateMachine:

Public Member Functions

MenuPage GetPageFromName (string pageName)
 
void SetLaunchBtnAvailable (bool value)
 
- 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...
 

Public Attributes

Button launchBtn
 
List< MenuPagepages
 
- Public Attributes inherited from StateMachine
bool logEnabled
 

Protected Member Functions

override void MyStart ()
 Override to provide an extended Start function for subclasses. Do not override 'Start()' itself!
 

Private Member Functions

void InitDepOnNetState ()
 

Additional Inherited Members

- 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 MainMenu state machine provides the logic behind switching the menu pages and provides callbacks for actions required from the states.

It is part of the Main Menu Scene.

Definition at line 14 of file MainMenuStateMachine.cs.

Member Function Documentation

◆ InitDepOnNetState()

void InitDepOnNetState ( )
inlineprivate
Todo:
: case "Local": was removed, so no direct transition to the local MP match page is possible this way. How can we get this functionality back? We would need to set the following: controller.Play("LocalMatchPage"); break;

Definition at line 59 of file MainMenuStateMachine.cs.


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