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

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.

主站蜘蛛池模板: 福建省| 清徐县| 桐柏县| 井陉县| 延津县| 敦化市| 崇仁县| 沾化县| 平阳县| 剑川县| 治县。| 新晃| 柏乡县| 营山县| 砀山县| 贺兰县| 广丰县| 南通市| 高青县| 高碑店市| 漠河县| 邮箱| 工布江达县| 定南县| 霍林郭勒市| 丁青县| 昌吉市| 两当县| 汉阴县| 仁寿县| 墨玉县| 龙井市| 富锦市| 修武县| 文化| 西峡县| 平谷区| 柳林县| 富平县| 皋兰县| 和林格尔县|