local Entity = require("entity") local Spike = {} Spike.__index = Spike setmetatable(Spike, { __index = Entity }) function Spike.new(entity) local self = setmetatable(Entity:new(entity.x, entity.y, entity.width, entity.height), Spike) self.isSpike = true return self end function Spike:setWorldPhysics(world) self:enablePhysics(world, "static") end function Spike:update(dt) self:syncFromPhysicsBody() end function Spike:draw() end return Spike