require "entity" Switch = class("Switch", Entity) 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] }) self.activated = false end function Switch:activate() if self.activated == false then self.activated = true end print("i am: ", self.activated) end