axmol/tools/tolua++/CCActionInstant.pkg

145 lines
3.2 KiB
Plaintext
Raw Normal View History

2011-06-14 14:31:25 +08:00
#include "CCAction.h"
#include "selector_protocol.h"
namespace cocos2d {
class CCActionInstant : public CCFiniteTimeAction //<NSCopying>
{
public:
CCActionInstant();
CCObject* copyWithZone(CCZone *pZone);
bool isDone(void);
void step(ccTime dt);
void update(ccTime time);
CCFiniteTimeAction * reverse(void);
};
class CCShow : public CCActionInstant
{
CCShow(){}
virtual void startWithTarget(CCNode *pTarget);
virtual CCFiniteTimeAction * reverse(void);
static CCShow * action();
};
class CCHide : public CCActionInstant
{
CCHide(){}
virtual void startWithTarget(CCNode *pTarget);
virtual CCFiniteTimeAction * reverse(void);
static CCHide * action();
};
class CCToggleVisibility : public CCActionInstant
{
CCToggleVisibility();
virtual void startWithTarget(CCNode *pTarget);
static CCToggleVisibility * action();
};
class CCFlipX : public CCActionInstant
{
CCFlipX();
static CCFlipX * actionWithFlipX(bool x);
bool initWithFlipX(bool x);
void startWithTarget(CCNode *pTarget);
CCFiniteTimeAction * reverse(void);
CCObject* copyWithZone(CCZone *pZone);
};
class CCFlipY : public CCActionInstant
{
public:
CCFlipY();
static CCFlipY * actionWithFlipY(bool y);
bool initWithFlipY(bool y);
void startWithTarget(CCNode *pTarget);
CCFiniteTimeAction * reverse(void);
CCObject* copyWithZone(CCZone *pZone);
};
class CCPlace : public CCActionInstant //<NSCopying>
{
CCPlace();
static CCPlace * actionWithPosition(CCPoint pos);
bool initWithPosition(CCPoint pos);
void startWithTarget(CCNode *pTarget);
CCObject* copyWithZone(CCZone *pZone);
};
/** @brief Calls a 'callback'
*/
class CCCallFunc : public CCActionInstant //<NSCopying>
{
CCCallFunc();
static CCCallFunc * actionWithTarget(SelectorProtocol* pSelectorTarget, SEL_CallFunc selector);
bool initWithTarget(SelectorProtocol* pSelectorTarget);
void execute();
void startWithTarget(CCNode *pTarget);
CCObject * copyWithZone(cocos2d::CCZone *pZone);
};
class CCCallFuncN : public CCCallFunc
{
CCCallFuncN();
static CCCallFuncN * actionWithTarget(SelectorProtocol* pSelectorTarget, SEL_CallFuncN selector);
bool initWithTarget(SelectorProtocol* pSelectorTarget, SEL_CallFuncN selector);
CCObject* copyWithZone(CCZone *pZone);
void execute();
};
class CCCallFuncND : public CCCallFuncN
{
/** creates the action with the callback and the data to pass as an argument */
static CCCallFuncND * actionWithTarget(SelectorProtocol* pSelectorTarget, SEL_CallFuncND selector, void* d);
/** initializes the action with the callback and the data to pass as an argument */
virtual bool initWithTarget(SelectorProtocol* pSelectorTarget, SEL_CallFuncND selector, void* d);
// super methods
virtual CCObject* copyWithZone(CCZone *pZone);
virtual void execute();
};
class CCCallFuncO : public CCCallFunc
{
CCCallFuncO();
static CCCallFuncO * actionWithTarget(SelectorProtocol* pSelectorTarget, SEL_CallFuncO selector, CCObject* pObject);
bool initWithTarget(SelectorProtocol* pSelectorTarget, SEL_CallFuncO selector, CCObject* pObject);
CCObject* copyWithZone(CCZone *pZone);
void execute();
};
}