chroma_solstice/main.lua
2015-03-11 21:08:15 -04:00

50 lines
No EOL
814 B
Lua

class = require "libs/middleclass"
Timer = require "libs/hump/timer"
Input = require "input"
require "color"
require "room"
require "player"
function love.load()
_initLoveDefaults()
_initGridVars()
loadSprites()
inputTimer = Timer.new()
player = Player:new(2, 1, "green")
end
function love.update(dt)
Input:handler()
end
function love.draw()
player:draw()
end
function _initLoveDefaults()
love.graphics.setDefaultFilter("linear", "nearest")
width = love.graphics.getWidth()
height = love.graphics.getHeight()
if width > height then
width = height
else
height = width
end
end
function _initGridVars()
gridWidth, gridHeight = 11, 11
drawScale = width / gridWidth / 16
end
function createCanvases()
end
function loadSprites()
playerSprite = love.graphics.newImage("art/player.png")
end