Quantcast
Channel: cocos2d-x - Cocos Forums
Viewing all articles
Browse latest Browse all 2748

How to delay an action or How to control program flow to wait for a particular action to complete

$
0
0

@MaheshAmbati wrote:

Continuing the discussion from How can I delay game/code during an action?:

I have code something like this.

I have to move a sprite to particular position and after completion of that action, i want to remove it.

But it is removing it without performing the action. How, to achieve this.
sp is a Sprite
sp->runAction(MoveTo::create(1.0, Vec2(visibleSize.width/2, visibleSize.height/2)));
this->removeChild(sp);

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 2748

Latest Images

Trending Articles



Latest Images