notamonopoly at May 2nd, 2013 09:26 — #1
I’m using cocos2d-2.1rc0-x-2.1.2-hotfix
I have a simple sequence I am trying to run but for some reason the CCDelayTime never seems to run, or it never finishes, I’m not sure which.
this~~>runAction, // <~~ this is the issue
Player::finished is never called if the CCDelayTime comes before it. If I comment out the CCDelayTime then Player::finished is called immediately without issue. I’ve also tried CCSequence::createWithTwoAction and the result is the same.
Does anyone have any suggestions?
notamonopoly at May 2nd, 2013 09:47 — #2
Instead of saying “this~~>runAction", I changed it to "this~~>getParent()->runAction”.
I’m not sure I understand why. The class where this is called is a custom class that extends several other custom classes that all stem from CCSprite. This class has been previously added to a custom Layer class, extending CCLayer.
In any case, it works now so I guess that’s all that matters.
huangliulove at May 3rd, 2013 02:19 — #3
use schedule instead is better