Files
maize-walker/main.lua
2024-12-08 12:24:50 -06:00

45 lines
856 B
Lua

require 'globals'
local Display = require 'src.display'
local GameCore = require 'src.core.game_core'
local display
local core
function love.load()
math.randomseed(os.time())
display = Display.new(VIRTUAL_WIDTH, VIRTUAL_HEIGHT)
core = GameCore.new()
local font = love.graphics.newImageFont(
'assets/fonts/font.png',
' abcdefghijklmnopqrstuvwxyz' ..
'ABCDEFGHIJKLMNOPQRSTUVWXYZ' ..
"0123456789.,!?-+/():;%&`'*#=[]\""
)
love.graphics.setFont(font)
end
function love.update(dt)
Timer.update(dt)
Flux.update(dt)
core:update(dt)
end
function love.draw()
display:draw(function()
core:draw()
end)
end
function love.resize(w, h)
display:resize(w, h)
core:resize(w, h)
end
function love.keypressed(key)
if key == 'f11' then display:toggleFullscreen() end
end