basix
This commit is contained in:
commit
b4905845e6
148 changed files with 30049 additions and 0 deletions
51
main.lua
Normal file
51
main.lua
Normal file
|
|
@ -0,0 +1,51 @@
|
|||
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
|
||||
Loading…
Add table
Add a link
Reference in a new issue