deactivate()
Deactivates the main Qiso loop. Call this any time after activate() when you want to pause Qiso and render something else, like a menu screen. Then call activate() again to resume Qiso rendering.
local qiso = require "plugin.qisoengine"
qiso.setAssetsFolder("assets")
qiso.loadTiledMap("sample-tilemap")
-- Enable camera panning when the screen is dragged
qiso.enableCameraPan()
-- Enable the main Qiso loop to render/update our world
qiso.activate()
local gamePaused = false
-- Pause or resume on tap.
function tapScreen(event)
if(gamePaused) then
qiso.activate()
gamePaused = false
else
qiso.deactivate()
gamePaused = true
end
end
Runtime:addEventListener('tap', tapScreen)