I have another question similar to the question at the start of this topic. I have some label. I wanna run some action on this label. Let it be updating the user score. What do I need to do with that label after action has finished? What the optimal sequence of doings will be here?
I think something like this:
Creating CCLabelTTF
this~~>addChild;
this~~>runAction( …. );
this->removeChild( thatLabel )
Is it right? So for the every update of the user score we need to create CCLabelTTF, add it to our scene, run action and remove it? And we should repeat it every update of the user score? I think it too many actions just for visual effect. Or it all about beauty requires sacrifice?
I don’t know any other ways to restart our action for successfully next start…
before you removeChild you should judge the action is done or no
like this:
CCAction *action = ….
runAction(action);
if (action->isDone)
removeChild(thatLabel);
before you removeChild you should judge the action is done or no
like this:
CCAction *action = ….
runAction(action);
if (action->isDone)
removeChild(thatLabel);
Oh, ok! But is there a way to reset our user score label to its original view without removing it and recreating again?
庐陵某 萧 wrote:
> before you removeChild you should judge the action is done or no
> like this:
> CCAction *action = ….
> runAction(action);
> if (action->isDone)
> removeChild(thatLabel);
>
Oh, ok! But is there a way to reset our user score label to its original view without removing it and recreating again?