BomberUnits
...a Unity learning project
GameManager Class Reference

The GameManager controls the overall flow of the program and organizes the interaction of its parts. More...

+ Inheritance diagram for GameManager:
+ Collaboration diagram for GameManager:

Public Member Functions

void QuitGame ()
 Quitting mechanism depends on whether we are in the Unity Editor or in the built application.
 

Static Public Member Functions

static GameManager Get ()
 Singleton access Getter.
 
static GameStateMachine GetSM ()
 Getter for external static singleton access to the GameStateMachine.
 
static string GetVersion ()
 The game version is needed for configuration of the MP server connection to ensure version sync.
 
static void StartMatch ()
 

Private Member Functions

void Awake ()
 Singleton Awake ensures the first instance is saved and further duplicates discarded. More...
 
void Start ()
 
void Init ()
 
void StartMatch (Level level)
 To be done from a state as well? Questions...
 

Private Attributes

GameStateMachine gameSM = null
 

Static Private Attributes

static string gameVersion = "0.3"
 Only same Versions can play MP together.
 
static GameManager instance
 Singleton pattern instance.
 

Detailed Description

The GameManager controls the overall flow of the program and organizes the interaction of its parts.

It can be accessed via Get() by its Singleton pattern, after this object was initialized. It is not deleted after scene switch. It notably tracks the current State of the game, see also: GameStateMachine To not overcrowd this class, functionality is continuously relocated to external managers. See also: UIManager MatchManager PlayerManger NetManager

Definition at line 21 of file GameManager.cs.

Member Function Documentation

◆ Awake()

void Awake ( )
inlineprivate

Singleton Awake ensures the first instance is saved and further duplicates discarded.

Todo:
Create a common 'Singleton' base MonoBehaviour for all these managers.

Definition at line 76 of file GameManager.cs.


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