2011-06-14 14:31:25 +08:00
|
|
|
|
2012-04-26 09:34:42 +08:00
|
|
|
class CCAnimationFrame : public CCObject
|
2012-02-02 14:26:38 +08:00
|
|
|
{
|
2012-04-26 09:34:42 +08:00
|
|
|
CCAnimationFrame();
|
|
|
|
~CCAnimationFrame();
|
2012-08-10 18:14:04 +08:00
|
|
|
|
2012-04-26 09:34:42 +08:00
|
|
|
bool initWithSpriteFrame(CCSpriteFrame* spriteFrame, float delayUnits, CCDictionary* userInfo);
|
2012-08-10 18:14:04 +08:00
|
|
|
|
2012-04-26 09:34:42 +08:00
|
|
|
CCSpriteFrame* getSpriteFrame();
|
|
|
|
void setSpriteFrame(CCSpriteFrame* pSpFrame);
|
2011-06-14 14:31:25 +08:00
|
|
|
|
2012-04-26 09:34:42 +08:00
|
|
|
float getDelayUnits();
|
|
|
|
void setDelayUnits(float fDelayUnits);
|
2011-06-14 14:31:25 +08:00
|
|
|
|
2012-04-26 09:34:42 +08:00
|
|
|
CCDictionary* getUserInfo();
|
|
|
|
void setUserInfo(CCDictionary* pDict);
|
|
|
|
};
|
2011-06-14 14:31:25 +08:00
|
|
|
|
2012-04-26 09:34:42 +08:00
|
|
|
|
|
|
|
class CCAnimation : public CCObject
|
|
|
|
{
|
2012-08-31 09:47:03 +08:00
|
|
|
static CCAnimation* create(CCArray *arrayOfAnimationFrameNames, float delayPerUnit, unsigned int loops);
|
2012-06-15 11:46:51 +08:00
|
|
|
static CCAnimation* create(void);
|
2012-08-10 18:14:04 +08:00
|
|
|
static CCAnimation* createWithSpriteFrames(CCArray* arrayOfSpriteFrameNames, float delay);
|
2012-09-17 14:40:42 +08:00
|
|
|
static CCAnimation* createWithSpriteFrames(CCArray* arrayOfSpriteFrameNames);
|
2012-04-26 09:34:42 +08:00
|
|
|
|
|
|
|
void addSpriteFrame(CCSpriteFrame *pFrame);
|
|
|
|
void addSpriteFrameWithFileName(const char *pszFileName);
|
|
|
|
void addSpriteFrameWithTexture(CCTexture2D* pobTexture, const CCRect& rect);
|
|
|
|
|
|
|
|
float getTotalDelayUnits();
|
|
|
|
|
|
|
|
float getDelayPerUnit();
|
|
|
|
void setDelayPerUnit(float fDelayPerUnits);
|
|
|
|
|
|
|
|
float getDuration();
|
|
|
|
|
2013-06-19 12:08:26 +08:00
|
|
|
CCAnimation* clone();
|
2013-07-25 19:58:59 +08:00
|
|
|
CCObject* copy();
|
2012-04-26 09:34:42 +08:00
|
|
|
|
|
|
|
CCArray* getFrames();
|
|
|
|
void setFrames(CCArray* pFrames);
|
|
|
|
|
|
|
|
|
|
|
|
bool getRestoreOriginalFrame();
|
|
|
|
void setRestoreOriginalFrame(bool bRestoreFrame);
|
|
|
|
|
|
|
|
unsigned int getLoops();
|
|
|
|
void setLoops(unsigned int uLoops);
|
2012-02-02 14:26:38 +08:00
|
|
|
};
|