The Cocos2d-x engine is designed to abstract various parts of the game into several concepts, including directors, scenes, scene layers, and character sprites.
These concepts can be found in almost any game, and the tour
The complexity of the play determines how the relationships between these parts
The degree of impurity. Specify the following:
Director (Ccdirector): As the name implies, the Director class is the organizer and leader of the game, is the head of the whole game, commander in chief. The Director class can make the game's running rules so that the in-game scenes, scene classes, and Sprite classes are organized in an orderly fashion.
? Scene (Ccscene): A scene is a level, or a game interface. Such a scenario determines the entire game.
? Scene Layer (Cclayer): A scene can consist of multiple scene layers. The scene layer is the background of the level, different levels are the scene needs of different scenery layer. Sometimes, in order to manage the different modules of the game more convenient, a scene will be divided into multiple scene layers, such as UI scene layer, game scene layer, some games need more detailed subdivision, can be divided into the game object scene layer and game map scene.
Character Wizard (Ccsprite): Character elves can be divided into the player control of the protagonist class, the enemy class, more complex games can be divided into NPC (non-player-controlled Character, non-player control role) category, organs and other categories.
They are the key elements of the game.
The core class "1" in Cocos2d-x