marmalade / OpenQuick

Marmalade Open Quick
113 stars 24 forks source link

director:moveToScene(scene1)Assertion failed: (false), function LUA_REPORT_ERRORS in iOS #12

Closed davewang closed 6 years ago

davewang commented 11 years ago

local scene1 = director:createScene() director:createLabel(dw/2, dh/2, "Scene 1")

local scene2 = director:createScene() director:createLabel(dw/2, dw/2, "Scene 2") local touch = function(event) print("phase - > "..event.phase) if event.phase == "ended" then if director:getCurrentScene() == scene1 then director:moveToScene(scene2) print("moveToScene - >scene2 ") else director:moveToScene(scene1) print("moveToScene - >scene1 ") end end end system:addEventListener("touch", touch)

director:getCurrentScene() is error.