2012-02-02 14:26:38 +08:00
|
|
|
|
|
|
|
enum {
|
|
|
|
kCCActionTagInvalid = -1,
|
|
|
|
};
|
|
|
|
|
|
|
|
class CCAction : public CCObject
|
|
|
|
{
|
|
|
|
// bool isDone(void);
|
|
|
|
// CCNode* getTarget(void);
|
|
|
|
// void setTarget(CCNode *pTarget);
|
|
|
|
// CCNode* getOriginalTarget(void);
|
|
|
|
// void setOriginalTarget(CCNode *pOriginalTarget);
|
|
|
|
// int getTag(void);
|
|
|
|
// void setTag(int nTag);
|
|
|
|
|
2012-06-15 11:46:51 +08:00
|
|
|
// static CCAction* create();
|
2012-02-02 14:26:38 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
class CCActionInterval : public CCAction
|
|
|
|
{
|
2012-06-15 10:51:53 +08:00
|
|
|
// float getElapsed(void);
|
2012-02-02 14:26:38 +08:00
|
|
|
// void setAmplitudeRate(CGFloat amp);
|
|
|
|
// CGFloat getAmplitudeRate(void);
|
|
|
|
};
|
|
|
|
|
|
|
|
class CCFiniteTimeAction : public CCActionInterval
|
|
|
|
{
|
2012-06-15 10:51:53 +08:00
|
|
|
// float getDuration(void);
|
|
|
|
// void setDuration(float duration);
|
2012-02-02 14:26:38 +08:00
|
|
|
// CCFiniteTimeAction* reverse(void);
|
|
|
|
};
|
|
|
|
|
|
|
|
// CCActionInterval
|
|
|
|
class CCSpeed : public CCAction
|
|
|
|
{
|
|
|
|
float getSpeed(void);
|
|
|
|
void setSpeed(float fSpeed);
|
|
|
|
CCAction* reverse(void);
|
|
|
|
|
2012-06-15 11:46:51 +08:00
|
|
|
static CCSpeed* create(CCActionInterval *pAction, float fRate);
|
2012-02-02 14:26:38 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
class CCFollow : public CCAction
|
|
|
|
{
|
|
|
|
bool isBoundarySet(void);
|
|
|
|
void setBoudarySet(bool bValue);
|
|
|
|
|
2012-06-15 11:46:51 +08:00
|
|
|
static CCFollow* create(CCNode *pFollowedNode);
|
|
|
|
static CCFollow* create(CCNode *pFollowedNode, CCRect rect);
|
2012-02-02 14:26:38 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
class CCSequence : public CCActionInterval
|
|
|
|
{
|
2012-06-15 11:46:51 +08:00
|
|
|
static CCFiniteTimeAction* create(CCFiniteTimeAction *pActionOne, CCFiniteTimeAction *pActionTwo);
|
|
|
|
static CCFiniteTimeAction* create(CCArray *actions);
|
2012-02-02 14:26:38 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
class CCRepeat : public CCActionInterval
|
|
|
|
{
|
2012-06-15 11:46:51 +08:00
|
|
|
static CCRepeat* create(CCActionInterval *pAction, unsigned int times);
|
2012-02-02 14:26:38 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
class CCRepeatForever : public CCActionInterval
|
|
|
|
{
|
2012-06-15 11:46:51 +08:00
|
|
|
static CCRepeatForever* create(CCActionInterval *pAction);
|
2012-02-02 14:26:38 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
class CCSpawn : public CCActionInterval
|
|
|
|
{
|
2012-06-15 11:46:51 +08:00
|
|
|
static CCFiniteTimeAction* create(CCArray *actions);
|
|
|
|
static CCSpawn* create(CCFiniteTimeAction *pAction1, CCFiniteTimeAction *pAction2);
|
2012-02-02 14:26:38 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
class CCRotateTo : public CCActionInterval
|
|
|
|
{
|
2012-06-15 11:46:51 +08:00
|
|
|
static CCRotateTo* create(float duration, float fDeltaAngle);
|
2012-02-02 14:26:38 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
class CCRotateBy : public CCActionInterval
|
|
|
|
{
|
2012-06-15 11:46:51 +08:00
|
|
|
static CCRotateBy* create(float duration, float fDeltaAngle);
|
2012-02-02 14:26:38 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
class CCMoveTo : public CCActionInterval
|
|
|
|
{
|
2012-06-15 11:46:51 +08:00
|
|
|
static CCMoveTo* create(float duration, CCPoint position);
|
2012-02-02 14:26:38 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
class CCMoveBy : public CCActionInterval
|
|
|
|
{
|
2012-06-15 11:46:51 +08:00
|
|
|
static CCMoveBy* create(float duration, CCPoint position);
|
2012-02-02 14:26:38 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
class CCSkewTo : public CCActionInterval
|
|
|
|
{
|
2012-06-15 11:46:51 +08:00
|
|
|
static CCSkewTo* create(float t, float sx, float sy);
|
2012-02-02 14:26:38 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
class CCSkewBy : public CCActionInterval
|
|
|
|
{
|
2012-06-15 11:46:51 +08:00
|
|
|
static CCSkewBy* create(float t, float deltaSkewX, float deltaSkewY);
|
2012-02-02 14:26:38 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
class CCJumpBy : public CCActionInterval
|
|
|
|
{
|
2012-06-15 11:46:51 +08:00
|
|
|
static CCJumpBy* create(float duration, CCPoint position, float height, int jumps);
|
2012-02-02 14:26:38 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
class CCJumpTo : public CCActionInterval
|
|
|
|
{
|
2012-06-15 11:46:51 +08:00
|
|
|
static CCJumpTo* create(float duration, CCPoint position, float height, int jumps);
|
2012-02-02 14:26:38 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
typedef struct _ccBezierConfig {
|
|
|
|
CCPoint endPosition;
|
|
|
|
CCPoint controlPoint_1;
|
|
|
|
CCPoint controlPoint_2;
|
|
|
|
} ccBezierConfig;
|
|
|
|
|
|
|
|
class CCBezierBy : public CCActionInterval
|
|
|
|
{
|
2012-06-15 11:46:51 +08:00
|
|
|
static CCBezierBy* create(float t, ccBezierConfig c);
|
2012-02-02 14:26:38 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
class CCBezierTo : public CCActionInterval
|
|
|
|
{
|
2012-06-15 11:46:51 +08:00
|
|
|
static CCBezierTo* create(float t, ccBezierConfig c);
|
2012-02-02 14:26:38 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
class CCScaleTo : public CCActionInterval
|
|
|
|
{
|
2012-06-15 11:46:51 +08:00
|
|
|
static CCScaleTo* create(float duration, float s);
|
|
|
|
static CCScaleTo* create(float duration, float sx, float sy);
|
2012-02-02 14:26:38 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
class CCScaleBy : public CCActionInterval
|
|
|
|
{
|
2012-06-15 11:46:51 +08:00
|
|
|
static CCScaleBy* create(float duration, float s);
|
|
|
|
static CCScaleBy* create(float duration, float sx, float sy);
|
2012-02-02 14:26:38 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
class CCBlink : public CCActionInterval
|
|
|
|
{
|
2012-06-15 11:46:51 +08:00
|
|
|
static CCBlink* create(float duration, unsigned int uBlinks);
|
2012-02-02 14:26:38 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
class CCFadeIn : public CCActionInterval
|
|
|
|
{
|
2012-06-15 11:46:51 +08:00
|
|
|
static CCFadeIn* create(float d);
|
2012-02-02 14:26:38 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
class CCFadeOut : public CCActionInterval
|
|
|
|
{
|
2012-06-15 11:46:51 +08:00
|
|
|
static CCFadeOut* create(float d);
|
2012-02-02 14:26:38 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
class CCFadeTo : public CCActionInterval
|
|
|
|
{
|
2012-06-15 11:46:51 +08:00
|
|
|
static CCFadeTo* create(float duration, GLubyte opacity);
|
2012-02-02 14:26:38 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
class CCTintTo : public CCActionInterval
|
|
|
|
{
|
2012-06-15 11:46:51 +08:00
|
|
|
static CCTintTo* create(float duration, GLubyte red, GLubyte green, GLubyte blue);
|
2012-02-02 14:26:38 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
class CCTintBy : public CCActionInterval
|
|
|
|
{
|
2012-06-15 11:46:51 +08:00
|
|
|
static CCTintBy* create(float duration, GLshort deltaRed, GLshort deltaGreen, GLshort deltaBlue);
|
2012-02-02 14:26:38 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
class CCDelayTime : public CCActionInterval
|
|
|
|
{
|
2012-06-15 11:46:51 +08:00
|
|
|
static CCDelayTime* create(float d);
|
2012-02-02 14:26:38 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
class CCReverseTime : public CCActionInterval
|
|
|
|
{
|
2012-06-15 11:46:51 +08:00
|
|
|
static CCReverseTime* create(CCFiniteTimeAction *pAction);
|
2012-02-02 14:26:38 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
class CCAnimate : public CCActionInterval
|
|
|
|
{
|
|
|
|
CCAnimation* getAnimation(void);
|
|
|
|
void setAnimation(CCAnimation *pAnimation);
|
|
|
|
|
2012-06-15 11:46:51 +08:00
|
|
|
static CCAction* create(CCAnimation *pAnimation);
|
2012-02-02 14:26:38 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
class CCProgressTo : public CCAction
|
|
|
|
{
|
2012-06-15 11:46:51 +08:00
|
|
|
static CCAction* create(float duration, float fPercent);
|
2012-02-02 14:26:38 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
class CCProgressFromTo : public CCAction
|
|
|
|
{
|
2012-06-15 11:46:51 +08:00
|
|
|
static CCAction* create(float duration, float fFromPercentage, float fToPercentage);
|
2012-02-02 14:26:38 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
// CCActionInstant
|
|
|
|
class CCShow : public CCAction
|
|
|
|
{
|
2012-06-15 11:46:51 +08:00
|
|
|
static CCAction* create();
|
2012-02-02 14:26:38 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
class CCHide : public CCAction
|
|
|
|
{
|
2012-06-15 11:46:51 +08:00
|
|
|
static CCAction* create();
|
2012-02-02 14:26:38 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
class CCToggleVisibility : public CCAction
|
|
|
|
{
|
2012-06-15 11:46:51 +08:00
|
|
|
static CCAction* create();
|
2012-02-02 14:26:38 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
class CCFlipX : public CCAction
|
|
|
|
{
|
2012-06-15 11:46:51 +08:00
|
|
|
static CCAction* create(bool x);
|
2012-02-02 14:26:38 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
class CCFlipY : public CCAction
|
|
|
|
{
|
2012-06-15 11:46:51 +08:00
|
|
|
static CCAction* create(bool y);
|
2012-02-02 14:26:38 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
class CCPlace : public CCAction //<NSCopying>
|
|
|
|
{
|
2012-06-15 11:46:51 +08:00
|
|
|
static CCAction* create(CCPoint pos);
|
2012-02-02 14:26:38 +08:00
|
|
|
};
|