init
This commit is contained in:
35
main.lua
Normal file
35
main.lua
Normal file
@@ -0,0 +1,35 @@
|
||||
local love = require "love"
|
||||
|
||||
require "menu"
|
||||
require "blackjack"
|
||||
|
||||
function love.load()
|
||||
love.window.setTitle("Spiele Auswahl")
|
||||
currentScreen = "menu"
|
||||
end
|
||||
|
||||
function love.update(dt)
|
||||
if currentScreen == "blackjack" then
|
||||
updateBlackjack(dt)
|
||||
end
|
||||
end
|
||||
|
||||
function love.draw()
|
||||
if currentScreen == "menu" then
|
||||
drawMenu()
|
||||
elseif currentScreen == "blackjack" then
|
||||
drawBlackjack()
|
||||
end
|
||||
end
|
||||
|
||||
function love.keypressed(key)
|
||||
if currentScreen == "menu" then
|
||||
if key == '1' then
|
||||
currentScreen = "blackjack"
|
||||
loadBlackjack()
|
||||
end
|
||||
elseif currentScreen == "blackjack" then
|
||||
handleBlackjackInput(key)
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user