Scenes in Cocos2d are used extensively to break the game into manageable components. While it would be possible to create your entire game in one scene, it is certainly not advisable. The scene is the root node of your node hierarchy. Each scene is a subclass of the
CCNode class. Only one scene can be active at any time, and changing the active scene is managed by the
CCDirector class .
Cocos2d provides multiple events that are called at certain points in the life cycle of your scene. You can override these events in any
CCNode subclass, and not just the
CCScene class. The following events are available:
init: This method is called when a scene is initialized in code. If the scene was created in SpriteBuilder, this method ...