For clarification, I have the following code.
if (sprite != NULL)
{
delay1 = CCDelayTime::create(1.5f);
delay2 = CCDelayTime::create(3.0f);
brickdelete = CallFunc::create([this]()
{
sprite->setOpacity(0);
sprite->getPhysicsBody()->removeFromWorld();
});
brickcreate = CallFunc::create([this]()
{
sprite->setOpacity(255);
sprite->setPhysicsBody(brickbody);
});
disintegratefunction = CallFunc::create([this]() {
sprite->runAction(disintegrateAnim);
});
appearfunction = CallFunc::create([this]() {
sprite->runAction(appearAnim);
});
runAction(Sequence::create(disintegratefunction, delay1, brickdelete, delay2, appearfunction, brickcreate, NULL));
}
I want to have multiple runAction instances happening at the same time. At the moment, if I start a runAction while another is in progress, I get multiple assertion fails and the remaining actions from the first sequence is added to the second runAction sequence (so the first body remains incomplete in some stage of the sequence).
I want them to be independent of each other. Is this possible? I also tried targetedaction but Iām not sure the code was good since it had the same result.