switches and chex and so forthgit add -A wow

This commit is contained in:
0x81c 2015-03-15 05:44:30 -04:00
parent b553d3f664
commit 7fcbd9e5da
2 changed files with 45 additions and 13 deletions

View file

@ -3,15 +3,18 @@ require "entity"
Switch = class("Switch", Entity)
function Switch:initialize(x, y, color)
print("hey!!", x, y, color)
print(color)
Entity.initialize(self, {
x = x,
y = y,
sizeX = 1,
sizeY = 1,
color = color,
collision = "none", --switches are floor elements that can't be pushed or bloc movement!!
sprite = switchSprite[color]
})
self.activated = false
end
function Switch:activate()
if self.activated == false then self.activated = true end
print("i am: ", self.activated)
end