mirror of https://github.com/axmolengine/axmol.git
Fixing script callbacks for schedule updates with negative and positive priorities
This commit is contained in:
parent
605771697a
commit
af3bc76062
|
@ -771,6 +771,12 @@ void CCScheduler::update(float dt)
|
||||||
{
|
{
|
||||||
if ((! pEntry->paused) && (! pEntry->markedForDeletion))
|
if ((! pEntry->paused) && (! pEntry->markedForDeletion))
|
||||||
{
|
{
|
||||||
|
CCScriptEngineProtocol* pEngine = CCScriptEngineManager::sharedManager()->getScriptEngine();
|
||||||
|
if (pEngine != NULL && kScriptTypeJavascript == pEngine->getScriptType())
|
||||||
|
{
|
||||||
|
CCScriptEngineManager::sharedManager()->getScriptEngine()->executeSchedule(NULL, dt, (CCNode *)pEntry->target);
|
||||||
|
}
|
||||||
|
|
||||||
pEntry->target->update(dt);
|
pEntry->target->update(dt);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -795,6 +801,12 @@ void CCScheduler::update(float dt)
|
||||||
{
|
{
|
||||||
if ((! pEntry->paused) && (! pEntry->markedForDeletion))
|
if ((! pEntry->paused) && (! pEntry->markedForDeletion))
|
||||||
{
|
{
|
||||||
|
CCScriptEngineProtocol* pEngine = CCScriptEngineManager::sharedManager()->getScriptEngine();
|
||||||
|
if (pEngine != NULL && kScriptTypeJavascript == pEngine->getScriptType())
|
||||||
|
{
|
||||||
|
CCScriptEngineManager::sharedManager()->getScriptEngine()->executeSchedule(NULL, dt, (CCNode *)pEntry->target);
|
||||||
|
}
|
||||||
|
|
||||||
pEntry->target->update(dt);
|
pEntry->target->update(dt);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue