- Game Development Patterns and Best Practices
- John P. Doran Matt Casanova
- 121字
- 2021-07-02 23:43:43
The ObjectManager
The M5ObjectManager is responsible for creating, destroying, updating, and searching for game objects. A game object is anything visible or invisible in the game. This could include the player, bullets, enemies, and triggers--the invisible regions in a game that cause events when collided with. The derived M5Stage classes will use the M5ObjectManager to create the appropriate objects for the stage. They can also search for specific game objects to update game logic. For example, a stage may search for a player object. If one doesn't exist, the manager will switch to the game over stage.
As seen in the previous diagram, our game will use components. This means the M5ObjectManager will be responsible for creating those as well.
推薦閱讀
- Mastering OpenLayers 3
- Spring 5.0 By Example
- DevOps with Kubernetes
- Docker進(jìn)階與實戰(zhàn)
- TypeScript項目開發(fā)實戰(zhàn)
- 數(shù)據(jù)結(jié)構(gòu)案例教程(C/C++版)
- 常用工具軟件立體化教程(微課版)
- Visual Basic程序設(shè)計(第三版)
- Mastering Apache Storm
- Sails.js Essentials
- Java RESTful Web Service實戰(zhàn)
- Getting Started with Web Components
- Visual Basic語言程序設(shè)計上機(jī)指導(dǎo)與練習(xí)(第3版)
- Java編程指南:語法基礎(chǔ)、面向?qū)ο蟆⒑瘮?shù)式編程與項目實戰(zhàn)
- Mastering Clojure