summaryrefslogtreecommitdiffhomepage
path: root/not/PhysicalBody.lua
diff options
context:
space:
mode:
authorAki <nthirtyone@gmail.com>2017-04-03 18:16:23 +0200
committerAki <nthirtyone@gmail.com>2017-04-03 18:16:23 +0200
commit8fa7ec07a1a9b4307ed9b221770c91a242cd68d9 (patch)
tree437826f0c6566343ef6272c0fbee1930cded0c59 /not/PhysicalBody.lua
parent9af03e90acde019820021d0bc2fe546d10c25ed4 (diff)
downloadroflnauts-8fa7ec07a1a9b4307ed9b221770c91a242cd68d9.zip
roflnauts-8fa7ec07a1a9b4307ed9b221770c91a242cd68d9.tar.gz
roflnauts-8fa7ec07a1a9b4307ed9b221770c91a242cd68d9.tar.bz2
Platform is now child of PhysicalBody
Diffstat (limited to 'not/PhysicalBody.lua')
-rw-r--r--not/PhysicalBody.lua9
1 files changed, 7 insertions, 2 deletions
diff --git a/not/PhysicalBody.lua b/not/PhysicalBody.lua
index 24e87c8..7c05262 100644
--- a/not/PhysicalBody.lua
+++ b/not/PhysicalBody.lua
@@ -57,9 +57,14 @@ function PhysicalBody:draw (offset_x, offset_y, scale, debug)
Sprite.draw(self, offset_x, offset_y, scale)
if debug then
for _,fixture in pairs(self.body:getFixtureList()) do
- if fixture:getCategory() == 2 then
+ local category = fixture:getCategory()
+ if category == 1 then
+ love.graphics.setColor(255, 69, 0, 140)
+ end
+ if category == 2 then
love.graphics.setColor(137, 255, 0, 120)
- else
+ end
+ if category == 3 then
love.graphics.setColor(137, 0, 255, 40)
end
-- TODO: `world` is not a member of `PhysicalBody` or its instance normally.