Merge pull request #9616 from seedofjoy/patch-1

Rewrite using already existing director's variable
This commit is contained in:
minggo 2014-12-25 10:52:42 +08:00
commit 836e5196d6
1 changed files with 4 additions and 4 deletions

View File

@ -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