mirror of https://github.com/axmolengine/axmol.git
Merge pull request #55 from chuanweizhang2013/v3luaruntime
fixed bug scheduleUpdate
This commit is contained in:
commit
68369ed2ea
|
@ -94,10 +94,7 @@ bool reloadScript(const string& modulefile)
|
|||
director->getTextureCache()->removeAllTextures();
|
||||
}
|
||||
FileUtils::getInstance()->purgeCachedEntries();
|
||||
|
||||
director->getScheduler()->unscheduleAll();
|
||||
director->getScheduler()->scheduleUpdate(director->getActionManager(), Scheduler::PRIORITY_SYSTEM, false);
|
||||
|
||||
|
||||
return (LuaEngine::getInstance()->reload(strfile.c_str())==0);
|
||||
}
|
||||
|
||||
|
|
|
@ -30,11 +30,11 @@ local function main()
|
|||
gameScene = scene.create()
|
||||
gameScene:playBgMusic()
|
||||
|
||||
if cc.Director:getInstance():getRunningScene() then
|
||||
if cc.Director:getInstance():getRunningScene() then
|
||||
cc.Director:getInstance():replaceScene(gameScene)
|
||||
else
|
||||
else
|
||||
cc.Director:getInstance():runWithScene(gameScene)
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in New Issue