官术网_书友最值得收藏!

The StageManager

The M5StageManager class is responsible for controlling the logic of each stage. We consider things such as the main menu, credits screen, options menu, loading screen, and playable levels to be stages. They contain behaviors that control the flow of the game. Examples of stage behavior include reading game object data from files, spawning units after specific time intervals, or switching between menus and levels.

StageManager is certainly not a standardized name. In other engines, this section of code may be called the game logic engine; however, most of our game logic will be separated into components so this name doesn't fit. No matter what it is called, this class will control which objects need to be created for the current stage, as well as when to switch to the next stage or quit the game altogether.

Even though this uses the name manager instead of engine, it serves as one of the core systems of the game. This class controls the main game loop and manages the collection of user stages. In order to make a game, users must derive at least one class from the base M5Stage class and overload the virtual functions to implement their game logic.

主站蜘蛛池模板: 丹江口市| 鄂托克旗| 耒阳市| 曲阜市| 阳朔县| 山东省| 马边| 霞浦县| 鄂伦春自治旗| 新巴尔虎右旗| 云龙县| 牙克石市| 乌恰县| 上高县| 泽库县| 来安县| 涡阳县| 剑阁县| 贡嘎县| 手游| 基隆市| 桃园市| 镇江市| 瑞金市| 罗甸县| 平定县| 泰兴市| 辽中县| 神木县| 曲麻莱县| 吴堡县| 上蔡县| 沙雅县| 白河县| 安乡县| 崇仁县| 行唐县| 黄平县| 德化县| 库尔勒市| 班玛县|