blob: 6e6a8a6268e9b163edb8c7d592545e41da0c1149 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
--- `PhysicalBody`
-- Abstract class for drawable body existing in Box2D's physical world.
PhysicalBody = {
body =--[[love.physics.newBody]]nil,
}
-- `PhysicalBody` is a child of `Sprite`.
require "not.Sprite"
PhysicalBody.__index = PhysicalBody
setmetatable(PhysicalBody, Sprite)
-- Constructor of `PhysicalBody`.
function PhysicalBody:new (world, x, y, imagePath)
local o = Sprite:new(imagePath)
return o
end
|