Game Development Reference
In-Depth Information
during game play when a file hasn't been added to the app's target. Or you
might simply waste space by adding files to targets that don't need them at all.
Figure 4-5 . Naming the new scene and making sure it's added to the appropriate group and targets
At this point, the GameLayer class is empty, and the first thing you need to do, to set
it up as a scene, is to add the + (id) scene method to it. The code to plug in is es-
sentially the same as in Chapter 3 , with only the layer's class name changed. What
you'll almost always need in any class is the -(id) init method. Adding the
-(void) dealloc method also can't hurt, if only to be able to log that an object
has been properly disposed of. Monitoring the dealloc method can be an effective
early warning system for detecting memory leaks.
Search Nedrilad ::

Custom Search