#import <AtlasSprite.h>
Inherits CocosNode, CocosNodeSize-p, CocosNodeFrames-p, CocosNodeOpacity-p, and CocosNodeRGB-p.
Public Member Functions | |
| (id) | - initWithRect:spriteManager: |
| (void) | - updateAtlas |
| (void) | - setTextureRect: |
Static Public Member Functions | |
| (id) | + spriteWithRect:spriteManager: |
Properties | |
| BOOL | dirtyPosition |
| BOOL | dirtyColor |
| NSUInteger | atlasIndex |
| CGRect | textureRect |
| BOOL | autoCenterFrames |
AtlasSprite can be used as a replacement of Sprite.
AtlasSprite has all the features from CocosNode with the following additions and limitations:
| - (id) initWithRect: | (CGRect) | rect | ||
| spriteManager: | (AtlasSpriteManager *) | manager | ||
initializes an AtlasSprite with an AtlasSpriteManager indicating the rect of the Atlas
| - (void) setTextureRect: | (CGRect) | rect |
updates the texture rect of the AtlasSprite
| + (id) spriteWithRect: | (CGRect) | rect | ||
| spriteManager: | (AtlasSpriteManager *) | manager | ||
creates an AtlasSprite with an AtlasSpriteManager inidicating the Rect of the Atlas
| - (void) updateAtlas |
updates the Quad in the TextureAtlas with it's new position, scale and rotation
- (NSUInteger) atlasIndex [read, assign] |
returns the altas index of the AtlasSprite
- (BOOL) autoCenterFrames [read, write, assign] |
whether or not the new frames will be auto centered
- (BOOL) dirtyColor [read, assign] |
whether or not the Sprite's color needs to be updated in the Atlas
- (BOOL) dirtyPosition [read, assign] |
whether or not the Sprite needs to be updated in the Atlas
- (CGRect) textureRect [read, assign] |
returns the rect of the AtlasSprite
1.5.8