mostly art stuffgit add -A

This commit is contained in:
0x81c 2015-03-15 13:54:47 -04:00
parent ffa35aec89
commit 687939b269
39 changed files with 27 additions and 7 deletions

View file

@ -2,19 +2,33 @@ require "entity"
Switch = class("Switch", Entity)
Switch.static.sprites = {
red = love.graphics.newImage("art/switch_r.png"),
green = love.graphics.newImage("art/switch_g.png"),
blue = love.graphics.newImage("art/switch_b.png"),
pressed = love.graphics.newImage("art/switch_pressed.png")
}
function Switch:initialize(x, y, color)
Entity.initialize(self, {
x = x,
y = y,
color = color,
collision = "none", --switches are floor elements that can't be pushed or bloc movement!!
sprite = switchSprite[color]
sprite = Switch.sprites[color]
})
self.activated = false
end
function Switch:activate()
if self.activated == false then self.activated = true end
print("i am: ", self.activated)
if self.activated == false then
self.activated = true
end
end
function Switch:deactivate()
if self.activated == true then
self.activated = false
end
end