diff options
author | Aki <nthirtyone@gmail.com> | 2017-07-12 09:52:06 +0200 |
---|---|---|
committer | Aki <nthirtyone@gmail.com> | 2017-07-12 09:52:06 +0200 |
commit | ea694c3659c801effaaf3361d3713f20517de3f5 (patch) | |
tree | f369c8689daf53d50dd7507ca56a07eed6422e01 /main.lua | |
parent | d161510d2dc33046459e874e716c02c76d49f7d5 (diff) | |
download | roflnauts-ea694c3659c801effaaf3361d3713f20517de3f5.zip roflnauts-ea694c3659c801effaaf3361d3713f20517de3f5.tar.gz roflnauts-ea694c3659c801effaaf3361d3713f20517de3f5.tar.bz2 |
SceneManager has Controller and Love2D callbacks
Diffstat (limited to 'main.lua')
-rw-r--r-- | main.lua | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -46,7 +46,7 @@ function love.load () end function love.draw () - sceneManager:getScene():draw() + sceneManager:draw() if debug then local scale = getScale() love.graphics.setFont(Font) @@ -57,7 +57,7 @@ function love.draw () end end -function love.update (dt) sceneManager:getScene():update(dt) end +function love.update (dt) sceneManager:update(dt) end function love.quit () Settings.save() end -- Pass input to Controller @@ -69,12 +69,12 @@ function love.keyreleased (key) Controller.keyreleased(key) end -- Controller callbacks function Controller.controlpressed (set, action, key) - sceneManager:getScene():controlpressed(set, action, key) + sceneManager:controlpressed(set, action, key) if key == "f5" then debug = not debug end end function Controller.controlreleased (set, action, key) - sceneManager:getScene():controlreleased(set, action, key) + sceneManager:controlreleased(set, action, key) end |