Merge pull request #838 from dumganhar/gles20

fixed #1159: Updated "CallFuncND + auto remove" test demo.
This commit is contained in:
James Chen 2012-04-12 20:56:05 -07:00
commit 91b4d52c31
2 changed files with 8 additions and 1 deletions

View File

@ -850,7 +850,7 @@ void ActionCallFuncND::onEnter()
centerSprites(1);
CCFiniteTimeAction* action = CCSequence::actions(CCMoveBy::actionWithDuration(2.0f, ccp(200,0)),
//CCCallFuncND::actionWithTarget(m_grossini, callfuncND_selector(ActionCallFuncND::removeFromParentAndCleanup), (void*)true),
CCCallFuncND::actionWithTarget(this, callfuncND_selector(ActionCallFuncND::removeFromParentAndCleanup), (void*)true),
NULL);
m_grossini->runAction(action);
@ -866,6 +866,12 @@ std::string ActionCallFuncND::subtitle()
return "CallFuncND + removeFromParentAndCleanup. Grossini dissapears in 2s";
}
void ActionCallFuncND::removeFromParentAndCleanup(CCNode* pSender, void* data)
{
bool bCleanUp = (bool)data;
m_grossini->removeFromParentAndCleanup(bCleanUp);
}
//------------------------------------------------------------------
//
// ActionSpawn

View File

@ -265,6 +265,7 @@ public:
virtual void onEnter();
virtual std::string title();
virtual std::string subtitle();
void removeFromParentAndCleanup(CCNode* pSender, void* data);
};
class ActionFollow : public ActionsDemo