diff options
Diffstat (limited to 'not/PhysicalBody.lua')
-rw-r--r-- | not/PhysicalBody.lua | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/not/PhysicalBody.lua b/not/PhysicalBody.lua new file mode 100644 index 0000000..6e6a8a6 --- /dev/null +++ b/not/PhysicalBody.lua @@ -0,0 +1,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
\ No newline at end of file |