Hey
i have simple CCSprite extended class inside i have simple function that suppose to make simple moving animation
the function looks like this :
void MAGem::highlightGem()
{
//Build a simple repeating "wobbly" animation
CCMoveBy *moveUp = CCMoveBy::create(0.5f,ccp(0,5));
CCMoveBy *moveDown = CCMoveBy::create(0.5f,ccp(0,-5));
CCSequence *moveAround = CCSequence::create(moveUp,moveDown,NULL);
CCRepeatForever *gemHop = CCRepeatForever::create(moveAround);
CCAction *action = runAction(gemHop);
if(action == NULL)
{
CCLOG("action is null!");
}
else
{
CCLOG("highlightGem()");
}
}
this is the header
class MAGem :public CCSprite ,public CCTargetedTouchDelegate
{
public:
MAGem();
~MAGem();
CC_SYNTHESIZE(int,rowNum,RowNum)
CC_SYNTHESIZE(int,colNum,ColNum)
CC_SYNTHESIZE(GemType,gemType,GemType)
CC_SYNTHESIZE(GemState,gemState,GemState)
CC_SYNTHESIZE(MAPlayfieldLayer*,gameLayer,GameLayer)
bool isGemSameAs(MAGem* otherGem);
bool isGemInSameRow(MAGem* otherGem);
bool isGemInSameColumn(MAGem* otherGem);
bool isGemBeside(MAGem* otherGem);
void highlightGem();
void stopHighlightGem();
CCRect rect();
bool containsTouchLocation(CCTouch* touch);
};
the function do called and all the action including the runAction function do run and not returning null poiters …
but no animation is seen the CCSprite doesn’t move at all.
what im doing wrong here ?
how can i verify if an action is running?