datix/main.lua
Simo-Pekka Kerkelä 6ff7fe3d1b char select
2019-02-09 18:18:50 +02:00

31 lines
600 B
Lua

require "scenes"
function love.load()
end
function love.update(dt)
if #scenes == 0 then
love.event.quit()
return
end
if scenes[#scenes].update then
scene_ended = scenes[#scenes].update(key)
end
end
function love.keypressed(key)
if scenes[#scenes].keypressed then
scenes[#scenes].keypressed(key)
end
end
function love.keyreleased(key)
if scenes[#scenes].keyreleased then
scenes[#scenes].keyreleased(key)
end
end
function love.draw()
if #scenes > 0 and scenes[#scenes].draw then
scenes[#scenes].draw()
end
end