#import <CCSpriteFrame.h>
Public Member Functions | |
| (id) | - initWithName: |
| (id) | - initWithName:frames: |
| (id) | - initWithName:delay: |
| (id) | - initWithName:delay:frames: |
| (void) | - addFrame: |
| (void) | - addFrameWithFilename: |
| (void) | - addFrameWithTexture:rect: |
Static Public Member Functions | |
| (id) | + animationWithName: |
| (id) | + animationWithName:frames: |
| (id) | + animationWithName:delay: |
| (id) | + animationWithName:delay:frames: |
Properties | |
| NSString * | name |
| float | delay |
| NSMutableArray * | frames |
an Animation object used within Sprites to perform animations
Definition at line 88 of file CCSpriteFrame.h.
| - (void) addFrame: | (CCSpriteFrame *) | frame |
Adds a frame to a CCAnimation.
| - (void) addFrameWithFilename: | (NSString *) | filename |
Adds a frame with an image filename. Internally it will create a CCSpriteFrame and it will add it. Added to facilitate the migration from v0.8 to v0.9.
| - (void) addFrameWithTexture: | (CCTexture2D *) | texture | ||
| rect: | (CGRect) | rect | ||
Adds a frame with a texture and a rect. Internally it will create a CCSpriteFrame and it will add it. Added to facilitate the migration from v0.8 to v0.9.
| + (id) animationWithName: | (NSString *) | name |
Creates a CCAnimation with a name
| + (id) animationWithName: | (NSString *) | name | ||
| delay: | (float) | delay | ||
Creates a CCAnimation with a name and delay between frames.
| + (id) animationWithName: | (NSString *) | name | ||
| delay: | (float) | delay | ||
| frames: | (NSArray *) | frames | ||
Creates a CCAnimation with a name, delay and an array of CCSpriteFrames.
| + (id) animationWithName: | (NSString *) | name | ||
| frames: | (NSArray *) | frames | ||
Creates a CCAnimation with a name and frames
| - (id) initWithName: | (NSString *) | name |
Initializes a CCAnimation with a name
| - (id) initWithName: | (NSString *) | name | ||
| delay: | (float) | delay | ||
Initializes a CCAnimation with a name and delay between frames.
| - (id) initWithName: | (NSString *) | name | ||
| delay: | (float) | delay | ||
| frames: | (NSArray *) | frames | ||
Initializes a CCAnimation with a name, delay and an array of CCSpriteFrames.
| - (id) initWithName: | (NSString *) | name | ||
| frames: | (NSArray *) | frames | ||
Initializes a CCAnimation with a name and frames
- (float) delay [read, write, assign] |
delay between frames in seconds.
Definition at line 98 of file CCSpriteFrame.h.
- (NSMutableArray*) frames [read, write, retain] |
array of frames
Definition at line 100 of file CCSpriteFrame.h.
- (NSString*) name [read, write, retain] |
name of the animation
Definition at line 96 of file CCSpriteFrame.h.