Game Development Reference
ded it to the IsoTilemap02 project. The player is a class derived from CCSprite ,
aptly named Player . Listing 11-4 shows the header file.
Listing 11-4. The Player Class Interface
#import < Foundation/Foundation.h>
@interface Player : CCSprite
The +(id) player method in Listing 11-5 allocates and initializes the sprite with
the ninja.png file.
Listing 11-5. The Player Class Implementation
return [[self alloc] initWithFile:@"ninja.png"];
You then create the player in the TileMapLayer class's init method:
self = [super init];