mirror of https://github.com/axmolengine/axmol.git
Merge pull request #838 from dumganhar/gles20
fixed #1159: Updated "CallFuncND + auto remove" test demo.
This commit is contained in:
commit
91b4d52c31
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue