diff options
Diffstat (limited to 'not/PhysicalBody.lua')
-rw-r--r-- | not/PhysicalBody.lua | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/not/PhysicalBody.lua b/not/PhysicalBody.lua index e726ea3..52e9357 100644 --- a/not/PhysicalBody.lua +++ b/not/PhysicalBody.lua @@ -1,5 +1,5 @@ --- `PhysicalBody` --- Abstract class for drawable body existing in Box2D's physical world. +-- Abstract class for drawable entity existing in `not.World`. PhysicalBody = { body =--[[love.physics.newBody]]nil, } @@ -9,14 +9,25 @@ require "not.Sprite" PhysicalBody.__index = PhysicalBody setmetatable(PhysicalBody, Sprite) --- Constructor of `PhysicalBody`. +--[[ Constructor of `PhysicalBody`. function PhysicalBody:new (world, x, y, imagePath) local o = setmetatable({}, self) o:init(world, x, y, imagePath) return o end +]] -- Initializator of `PhysicalBody`. function PhysicalBody:init (world, x, y, imagePath) Sprite.init(self, imagePath) end + +-- Update of `PhysicalBody`. +function PhysicalBody:update (dt) + Sprite.update(self, dt) +end + +-- Draw of `PhysicalBody`. +function PhysicalBody:draw (offset_x, offset_y, scale, debug) + -- TODO: Move debug part here from `not.Hero.draw`. +end |