mirror of https://github.com/axmolengine/axmol.git
Merge pull request #9616 from seedofjoy/patch-1
Rewrite using already existing director's variable
This commit is contained in:
commit
836e5196d6
|
@ -34,17 +34,17 @@ local function main()
|
|||
--set FPS. the default value is 1.0/60 if you don't call this
|
||||
director:setAnimationInterval(1.0 / 60)
|
||||
|
||||
cc.Director:getInstance():getOpenGLView():setDesignResolutionSize(480, 320, 1)
|
||||
director:getOpenGLView():setDesignResolutionSize(480, 320, 1)
|
||||
|
||||
--create scene
|
||||
local scene = require("GameScene")
|
||||
local gameScene = scene.create()
|
||||
gameScene:playBgMusic()
|
||||
|
||||
if cc.Director:getInstance():getRunningScene() then
|
||||
cc.Director:getInstance():replaceScene(gameScene)
|
||||
if director:getRunningScene() then
|
||||
director:replaceScene(gameScene)
|
||||
else
|
||||
cc.Director:getInstance():runWithScene(gameScene)
|
||||
director:runWithScene(gameScene)
|
||||
end
|
||||
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue