cocos2d for iPhone 1.0.0
2D engine for iOS and OS X
Public Member Functions | Static Public Member Functions | Properties
CCAtlasNode Class Reference

#import <CCAtlasNode.h>

Inheritance diagram for CCAtlasNode:
Inheritance graph
[legend]
Collaboration diagram for CCAtlasNode:
Collaboration graph
[legend]

List of all members.

Public Member Functions

(id) - initWithTileFile:tileWidth:tileHeight:itemsToRender:
(void) - updateAtlasValues

Static Public Member Functions

(id) + atlasWithTileFile:tileWidth:tileHeight:itemsToRender:

Properties

CCTextureAtlastextureAtlas
ccBlendFunc blendFunc
GLubyte opacity
ccColor3B color
NSUInteger quadsToDraw

Detailed Description

CCAtlasNode is a subclass of CCNode that implements the CCRGBAProtocol and CCTextureProtocol protocol

It knows how to render a TextureAtlas object. If you are going to render a TextureAtlas consider subclassing CCAtlasNode (or a subclass of CCAtlasNode)

All features from CCNode are valid, plus the following features:

Definition at line 41 of file CCAtlasNode.h.


Member Function Documentation

+ (id) atlasWithTileFile: (NSString *)  tile
tileWidth: (NSUInteger)  w
tileHeight: (NSUInteger)  h
itemsToRender: (NSUInteger)  c 

creates a CCAtlasNode with an Atlas file the width and height of each item measured in points and the quantity of items to render

- (id) initWithTileFile: (NSString *)  tile
tileWidth: (NSUInteger)  w
tileHeight: (NSUInteger)  h
itemsToRender: (NSUInteger)  c 

initializes an CCAtlasNode with an Atlas file the width and height of each item measured in points and the quantity of items to render

- (void) updateAtlasValues

updates the Atlas (indexed vertex array). Shall be overriden in subclasses


Property Documentation

- (ccBlendFunc) blendFunc [read, write, assign]

conforms to CCTextureProtocol protocol

Definition at line 74 of file CCAtlasNode.h.

- (ccColor3B) color [read, write, assign]

conforms to CCRGBAProtocol protocol

Definition at line 79 of file CCAtlasNode.h.

- (GLubyte) opacity [read, write, assign]

conforms to CCRGBAProtocol protocol

Definition at line 77 of file CCAtlasNode.h.

- (NSUInteger) quadsToDraw [read, write, assign]

how many quads to draw

Definition at line 82 of file CCAtlasNode.h.

- (CCTextureAtlas*) textureAtlas [read, write, retain]

conforms to CCTextureProtocol protocol

Definition at line 71 of file CCAtlasNode.h.


The documentation for this class was generated from the following file:
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Properties Defines

cocos2d for iPhone API Reference - Generated using Doxygen 1.7.4