summaryrefslogtreecommitdiffhomepage
path: root/not/PhysicalBody.lua
diff options
context:
space:
mode:
authorAki <nthirtyone@gmail.com>2017-03-19 00:21:02 +0100
committerAki <nthirtyone@gmail.com>2017-03-19 00:21:02 +0100
commit340a3a4b92de5495b47e8e1e102178edfd97514f (patch)
tree62e528b45c90affd4339942a8911fe51137ad963 /not/PhysicalBody.lua
parentc16c1206f5884614157b8f5049e601ff77478d7f (diff)
downloadroflnauts-340a3a4b92de5495b47e8e1e102178edfd97514f.zip
roflnauts-340a3a4b92de5495b47e8e1e102178edfd97514f.tar.gz
roflnauts-340a3a4b92de5495b47e8e1e102178edfd97514f.tar.bz2
Night commit, added PhysicalBody, newImage to sprite
Diffstat (limited to 'not/PhysicalBody.lua')
-rw-r--r--not/PhysicalBody.lua16
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