mirror of https://github.com/axmolengine/axmol.git
32 lines
746 B
Plaintext
32 lines
746 B
Plaintext
|
|
#include "CCNode.h"
|
|
#include "CCProtocols.h"
|
|
#include "ccTypes.h"
|
|
|
|
namespace cocos2d {
|
|
class CCTextureAtlas;
|
|
|
|
class CCAtlasNode : public CCNode, public CCRGBAProtocol, public CCTextureProtocol
|
|
{
|
|
|
|
CCAtlasNode();
|
|
|
|
static CCAtlasNode * atlasWithTileFile(const char* tile,int tileWidth, int tileHeight, int itemsToRender);
|
|
|
|
/** initializes an CCAtlasNode with an Atlas file the width and height of each item and the quantity of items to render*/
|
|
bool initWithTileFile(const char* tile, int tileWidth, int tileHeight, int itemsToRender);
|
|
|
|
void updateAtlasValues();
|
|
|
|
void draw();
|
|
CCRGBAProtocol* convertToRGBAProtocol();
|
|
CCTexture2D* getTexture(void);
|
|
void setTexture(CCTexture2D *texture);
|
|
|
|
|
|
};
|
|
}//namespace cocos2d
|
|
|
|
|
|
|