April 2017
Beginner to intermediate
394 pages
9h 16m
English
Another aspect of the Mach5 Engine that uses the State pattern is the M5StageManager class:
class M5StageManager { public: friend class M5App; //Registers a GameStage and a builder with the the StageManger static void AddStage(M5StageTypes type, M5StageBuilder* builder); //Removes a Stage Builder from the Manager static void RemoveStage(M5StageTypes type); //Clears all stages from the StageManager static void ClearStages(void); //Sets the given stage ID to the starting stage of the game static void SetStartStage(M5StageTypes startStage); //Test if the game is quitting static bool IsQuitting(void); //Test stage is restarting static bool IsRestarting(void); //Gets the pointer to the ...Read now
Unlock full access