i started creating the gamemanager idea and also the ui, started off with a basic main menu, options light up; added a debug mode which right now displays the name of the key you press, which would be handy for the 3ds

This commit is contained in:
2018-09-01 04:52:54 +02:00
parent bebbc8b82e
commit d0fb98ad8c
5 changed files with 333 additions and 5 deletions

View File

@@ -1,10 +1,10 @@
require "snake"
--[[require "snake"
require "swat"
function love.load()
--love.graphics.set3D(true)
snakeplayer:hardreset()
swat:load()
end
@@ -128,5 +128,36 @@ function love.mousepressed(a, b)
local x, y = love.mouse.getPosition()
fly:kill(x, y)
end
]]
--require("potion-compat")
require "gamemanager"
function love.load()
man:load()
end
function love.update(dt)
man:update(dt)
end
function love.draw()
man:draw()
end
function love.keypressed(key)
man:keypressed(key)
end
function love.keyreleased(key)
man:keyreleased(key)
end
function love.mousepressed(x, y)
man:mousepressed(x, y)
end
--this is for debugging on pc
require("potion-compat")