Decoration = class(Entity, { type = "Decoration", supertype = Entity.type, display = Animation:new(animation.particle.simple), }) function Decoration:new(x,y,animation,light_data) local o = Entity:new(x,y) o.pos = {x = x, y = y} if animation then o.body = Animation:new(animation) o:centerOffset(o.body) o:createBox(o.body) end if light_data then o.light = Light:new(o.pos.x,o.pos.y,light_data) end o:id() setmetatable(o, self) return o end function Decoration:handleAnimation() self.body:animate() self:draw(self.body) end require "code/entities/decorations/candelabra"