diff options
Diffstat (limited to 'not/PhysicalBody.lua')
-rw-r--r-- | not/PhysicalBody.lua | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/not/PhysicalBody.lua b/not/PhysicalBody.lua index 6e6a8a6..1f91faf 100644 --- a/not/PhysicalBody.lua +++ b/not/PhysicalBody.lua @@ -11,6 +11,12 @@ setmetatable(PhysicalBody, Sprite) -- Constructor of `PhysicalBody`. function PhysicalBody:new (world, x, y, imagePath) - local o = Sprite:new(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
\ No newline at end of file |