AtlasSprite Class Reference

#import <AtlasSprite.h>

Inherits CocosNode, CocosNodeSize-p, CocosNodeFrames-p, CocosNodeOpacity-p, and CocosNodeRGB-p.

Collaboration diagram for AtlasSprite:

Collaboration graph
[legend]

List of all members.

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


Detailed Description

AtlasSprite is a CocosNode object that implements the CocosNodeSize, CocosNodeFrames, CocosNodeOpacity and CocosNodeRGB protocols.

AtlasSprite can be used as a replacement of Sprite.

AtlasSprite has all the features from CocosNode with the following additions and limitations:

Since:
v0.7.1

Member Function Documentation

- (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


Property Documentation

- (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


The documentation for this class was generated from the following file:

Generated on Tue Jun 9 10:39:29 2009 for cocos2d for iPhone 0.7.3 by  doxygen 1.5.8