char select

This commit is contained in:
Simo-Pekka Kerkelä 2019-02-09 18:18:50 +02:00
parent 240cfb51f7
commit 6ff7fe3d1b
2 changed files with 46 additions and 9 deletions

View file

@ -5,6 +5,7 @@ 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)
@ -24,7 +25,7 @@ function love.keyreleased(key)
end
function love.draw()
if scenes[#scenes].draw then
if #scenes > 0 and scenes[#scenes].draw then
scenes[#scenes].draw()
end
end