doors worxlove .

This commit is contained in:
0x81c 2015-03-15 07:08:35 -04:00
parent 7fcbd9e5da
commit 85dd66b1e4
8 changed files with 105 additions and 24 deletions

View file

@ -13,6 +13,7 @@ function love.load()
_initDefaults()
_initGridVars()
_initSounds()
_initGlobalColors()
loadSprites()
gameCanvas = love.graphics.newCanvas()
@ -109,6 +110,11 @@ function _initGridVars()
worldSha = 1
end
function _initGlobalColors()
gColor = {}
gColor.red, gColor.green, gColor.blue, gColor.white = Color:new("red"), Color:new("green"), Color:new("blue"), Color:new("white")
end
function _initSounds()
staticWave = sfxr.newSound()
staticWave.wavetype = 3
@ -133,6 +139,13 @@ function loadSprites()
green = love.graphics.newImage("art/wall_g.png"),
blue = love.graphics.newImage("art/wall_b.png")
}
doorSprite = {
white = love.graphics.newImage("art/door_locked_w.png"),
red = love.graphics.newImage("art/door_locked_r.png"),
green = love.graphics.newImage("art/door_locked_g.png"),
blue = love.graphics.newImage("art/door_locked_b.png"),
unlocked = love.graphics.newImage("art/door_unlocked.png")
}
switchSprite = {
red = love.graphics.newImage("art/switch_r.png"),
green = love.graphics.newImage("art/switch_g.png"),