#import <CCSpriteSheet.h>
Inherits CCNode, and CCTextureProtocol-p.
Inherited by CCBitmapFontAtlas, and CCTMXLayer.
Public Member Functions | |
| (id) | - initWithTexture:capacity: |
| (id) | - initWithFile:capacity: |
| (CCSprite *) | - createSpriteWithRect: |
| (void) | - initSprite:rect: |
| (void) | - removeChildAtIndex:cleanup: |
| (void) | - removeChild:cleanup: |
Static Public Member Functions | |
| (id) | + spriteSheetWithTexture: |
| (id) | + spriteSheetWithTexture:capacity: |
| (id) | + spriteSheetWithFile: |
| (id) | + spriteSheetWithFile:capacity: |
Properties | |
| CCTextureAtlas * | textureAtlas |
| ccBlendFunc | blendFunc |
| NSMutableArray * | descendants |
CCSpriteSheet is the object that draws all the CCSprite objects that belongs to this object. Use 1 CCSpriteSheet per TextureAtlas
Limitations:
Definition at line 35 of file CCSpriteSheet.h.
| - (CCSprite*) createSpriteWithRect: |
creates an sprite with a rect in the CCSpriteSheet. It's the same as:
| - (void) initSprite: | (CCSprite *) | sprite |
initializes a previously created sprite with a rect. This sprite will have the same texture as the CCSpriteSheet. It's the same as:
| - (id) initWithFile: | (NSString *) | fileImage | ||
| capacity: | (NSUInteger) | capacity | ||
initializes a CCSpriteSheet with a file image (.png, .jpeg, .pvr, etc). The file will be loaded using the TextureMgr.
| - (id) initWithTexture: | (CCTexture2D *) | tex | ||
| capacity: | (NSUInteger) | capacity | ||
initializes a CCSpriteSheet with a texture2d and capacity
| - (void) removeChild: | (CCSprite *) | sprite | ||
| cleanup: | (BOOL) | doCleanup | ||
removes a child given a reference. It will also cleanup the running actions depending on the cleanup parameter.
| - (void) removeChildAtIndex: | (NSUInteger) | index | ||
| cleanup: | (BOOL) | doCleanup | ||
removes a child given a certain index. It will also cleanup the running actions depending on the cleanup parameter.
| + (id) spriteSheetWithFile: | (NSString *) | fileImage |
creates a CCSpriteSheet with a file image (.png, .jpeg, .pvr, etc). The file will be loaded using the TextureMgr.
| + (id) spriteSheetWithFile: | (NSString *) | fileImage | ||
| capacity: | (NSUInteger) | capacity | ||
creates a CCSpriteSheet with a file image (.png, .jpeg, .pvr, etc) and capacity. The file will be loaded using the TextureMgr.
| + (id) spriteSheetWithTexture: | (CCTexture2D *) | tex |
creates a CCSpriteSheet with a texture2d
| + (id) spriteSheetWithTexture: | (CCTexture2D *) | tex | ||
| capacity: | (NSUInteger) | capacity | ||
creates a CCSpriteSheet with a texture2d and capacity
- (ccBlendFunc) blendFunc [read, write, assign] |
conforms to CCTextureProtocol protocol
Definition at line 50 of file CCSpriteSheet.h.
- (NSMutableArray*) descendants [read, assign] |
descendants (children, gran children, etc)
Definition at line 53 of file CCSpriteSheet.h.
- (CCTextureAtlas*) textureAtlas [read, write, retain] |
returns the TextureAtlas that is used
Definition at line 47 of file CCSpriteSheet.h.