we try to use stopAction to control the Sequence action, but we found it’s not work.
Test code like below:
m_testAction = this->runAction(Sequence::create(CallFunc::create(CC_CALLBACK_0(MainLayer::test1, this)),
DelayTime::create(2),
CallFunc::create(CC_CALLBACK_0(MainLayer::test2, this)),
CallFunc::create(CC_CALLBACK_0(MainLayer::test3, this)),
NULL));
void MainLayer::test1()
{
cout << "test1 done" << endl;
}
void MainLayer::test2()
{
cout << "test2 done" << endl;
this->stopAction(m_testAction);
}
void MainLayer::test3()
{
cout << "test3 done" << endl;
}
The expect output should be:
test1 done
test2 done
But we got:
test1 done
test2 done
test3 done
It’s become normal when we comment the line of DelayTime::create(2).
Does it a bug of cocos2dx 3.6?