mirror of https://github.com/axmolengine/axmol.git
Including callback support for onEnterTransitionDidFinish and onExitTransitionDidStart
This commit is contained in:
parent
6c8d2ea75b
commit
c62462d997
|
@ -808,11 +808,17 @@ void CCNode::onEnter()
|
||||||
void CCNode::onEnterTransitionDidFinish()
|
void CCNode::onEnterTransitionDidFinish()
|
||||||
{
|
{
|
||||||
arrayMakeObjectsPerformSelector(m_pChildren, onEnterTransitionDidFinish, CCNode*);
|
arrayMakeObjectsPerformSelector(m_pChildren, onEnterTransitionDidFinish, CCNode*);
|
||||||
|
#ifdef COCOS2D_JAVASCRIPT
|
||||||
|
CCScriptEngineManager::sharedManager()->getScriptEngine()->executeFunctionWithIntegerData(m_nScriptHandler, kCCNodeOnEnterTransitionDidFinish, this);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void CCNode::onExitTransitionDidStart()
|
void CCNode::onExitTransitionDidStart()
|
||||||
{
|
{
|
||||||
arrayMakeObjectsPerformSelector(m_pChildren, onExitTransitionDidStart, CCNode*);
|
arrayMakeObjectsPerformSelector(m_pChildren, onExitTransitionDidStart, CCNode*);
|
||||||
|
#ifdef COCOS2D_JAVASCRIPT
|
||||||
|
CCScriptEngineManager::sharedManager()->getScriptEngine()->executeFunctionWithIntegerData(m_nScriptHandler, kCCNodeOnExitTransitionDidStart, this);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void CCNode::onExit()
|
void CCNode::onExit()
|
||||||
|
|
|
@ -61,7 +61,9 @@ enum {
|
||||||
enum {
|
enum {
|
||||||
kCCNodeOnEnter,
|
kCCNodeOnEnter,
|
||||||
kCCNodeOnExit,
|
kCCNodeOnExit,
|
||||||
kCCMenuItemActivated
|
kCCMenuItemActivated,
|
||||||
|
kCCNodeOnEnterTransitionDidFinish,
|
||||||
|
kCCNodeOnExitTransitionDidStart
|
||||||
};
|
};
|
||||||
|
|
||||||
/** @brief CCNode is the main element. Anything thats gets drawn or contains things that get drawn is a CCNode.
|
/** @brief CCNode is the main element. Anything thats gets drawn or contains things that get drawn is a CCNode.
|
||||||
|
|
Loading…
Reference in New Issue