2011-06-14 14:31:25 +08:00
|
|
|
|
2012-02-02 14:26:38 +08:00
|
|
|
class CCSpriteBatchNode : public CCNode
|
|
|
|
{
|
|
|
|
CCTextureAtlas* getTextureAtlas(void);
|
|
|
|
void setTextureAtlas(CCTextureAtlas* textureAtlas);
|
|
|
|
CCArray* getDescendants(void);
|
|
|
|
|
|
|
|
void increaseAtlasCapacity();
|
|
|
|
void removeChildAtIndex(unsigned int index, bool doCleanup);
|
|
|
|
void insertChild(CCSprite *child, unsigned int index);
|
2012-08-10 18:14:04 +08:00
|
|
|
void appendChild(CCSprite *child);
|
2012-02-02 14:26:38 +08:00
|
|
|
void removeSpriteFromAtlas(CCSprite *sprite);
|
|
|
|
|
|
|
|
unsigned int rebuildIndexInOrder(CCSprite *parent, unsigned int index);
|
|
|
|
unsigned int highestAtlasIndexInChild(CCSprite *sprite);
|
|
|
|
unsigned int lowestAtlasIndexInChild(CCSprite *sprite);
|
|
|
|
unsigned int atlasIndexForChild(CCSprite *sprite, int z);
|
|
|
|
|
2012-08-10 18:14:04 +08:00
|
|
|
void reorderBatch(bool reorder);
|
2012-02-02 14:26:38 +08:00
|
|
|
void setTexture(CCTexture2D *texture);
|
|
|
|
CCTexture2D* getTexture(void);
|
2013-07-08 11:34:31 +08:00
|
|
|
void setBlendFunc(const BlendFunc &blendFunc);
|
|
|
|
const BlendFunc& getBlendFunc(void);
|
2012-02-02 14:26:38 +08:00
|
|
|
|
2012-08-10 18:14:04 +08:00
|
|
|
void addChild(CCNode * child);
|
|
|
|
void addChild(CCNode * child, int zOrder);
|
|
|
|
void addChild(CCNode * child, int zOrder, int tag);
|
|
|
|
void reorderChild(CCNode * child, int zOrder);
|
|
|
|
|
|
|
|
void removeChild(CCNode* child, bool cleanup);
|
|
|
|
void removeAllChildrenWithCleanup(bool cleanup);
|
|
|
|
void sortAllChildren();
|
|
|
|
|
|
|
|
static CCSpriteBatchNode* createWithTexture(CCTexture2D *tex);
|
|
|
|
static CCSpriteBatchNode* createWithTexture(CCTexture2D* tex, unsigned int capacity);
|
2012-06-15 11:46:51 +08:00
|
|
|
static CCSpriteBatchNode* create(const char* fileImage, unsigned int capacity);
|
2012-09-17 14:40:42 +08:00
|
|
|
static CCSpriteBatchNode* create(const char* fileImage);
|
2012-02-02 14:26:38 +08:00
|
|
|
};
|