i have strange situation where i try to run blink action as part of Sequence
on sprites Although the method getNumberOfRunningActions returns 1 the sprite dosn’t blink.
where pMatchedSymbolArray is array of ReelSymbol Sprite extendet class
class ReelSymbol :public Sprite
{
public:
CREATE_FUNC(ReelSymbol);
ReelSymbol();
virtual bool init();
void setup();
static ReelSymbol* createWithSpriteFrameName(const std::string& spriteFrameName);
private:
int getIntFromName(std::string key);
Settings* pSettings;
};
for(ssize_t a=0; a<pMatchedSymbolArray->count();a++)
{
auto actionBlink = Blink::create(2, 5);
auto repeat = Repeat::create(actionBlink, 2);
ReelSymbol* symbol = ((ReelSymbol*)pMatchedSymbolArray->getObjectAtIndex(a));
auto actionSequence = Sequence::create(
actionBlink,
DelayTime::create(2),
CallFunc::create( std::bind(&LinesManager::AnimationUnitCallback, this, symbol,pMatchedSymbolArray->count()) ),
NULL);
ReelSymbol* thisReelSymbol = ((ReelSymbol*)pMatchedSymbolArray->getObjectAtIndex(a));
thisReelSymbol->runAction(actionSequence);// NOT WORKING WITH SEQUENCE
int no = thisReelSymbol->getNumberOfRunningActions();
CCLOG("getNumberOfRunningActions: %d",no);
}
void LinesManager::AnimationUnitCallback(Node* sender,int iMatchedSymbolArrayCount)
{
}
the sprite blink only if i run:
auto actionBlink = Blink::create(2, 5);
....
....
thisReelSymbol->runAction(actionBlink );
How can i check what is wrong here ?
is there any easy methods to debug such situation ?