id_
This commit is contained in:
parent
d5a60336f5
commit
9763040c99
4 changed files with 35 additions and 11 deletions
18
main.lua
18
main.lua
|
|
@ -6,24 +6,34 @@ require "room"
|
|||
require "player"
|
||||
|
||||
function love.load()
|
||||
_initLoveDefaults()
|
||||
_initDefaults()
|
||||
_initGridVars()
|
||||
|
||||
loadSprites()
|
||||
|
||||
inputTimer = Timer.new()
|
||||
player = Player:new(2, 1, "green")
|
||||
|
||||
currentRoom = Room:new{
|
||||
player = {
|
||||
red = {x = 3, y = 5},
|
||||
green = {x = 4, y = 3},
|
||||
blue = {x = 3, y = 10}
|
||||
}
|
||||
}
|
||||
end
|
||||
|
||||
function love.update(dt)
|
||||
Input:handler()
|
||||
|
||||
currentRoom:update()
|
||||
end
|
||||
|
||||
function love.draw()
|
||||
player:draw()
|
||||
love.graphics.setBlendMode("screen")
|
||||
currentRoom:draw()
|
||||
end
|
||||
|
||||
function _initLoveDefaults()
|
||||
function _initDefaults()
|
||||
love.graphics.setDefaultFilter("linear", "nearest")
|
||||
|
||||
width = love.graphics.getWidth()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue