blob: f6e72b529cc5ca50f5176d3b009aa4db279d413c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
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)
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
|