But it not work ? My question is how can I stop the delayAction in sequence action ? I don’t want to stop the seq action because , some logic game in gameFunction will work wrong !
I don’t think you can stop a specific action inside a sequence, only the whole sequence.
You can achieve your desired result several ways though:
Whenever you tried to call this->stopActionByTag(123); you can simply stop the full sequence instead. Then call the function that was supposed to go after the delay, ie the gameFunction.
To remove duplicate codes in exampe 1, you can create a function that calls the action sequence with an input parameter of the delay. ex: void createDelayedGameFunction(float delay);. Then in your first call, call this->createDelayedGameFunction(5.0f); and when you stop it call this->createDelayedGameFunction(0);.
Step 1 or step 2 I provided should not change anything other than starting the function sooner which is your desired result from what you seem to have said. If you provide more information on what supposed logic will work wrong we might be able to help further, but I don’t seem to see how the steps will change anything.