diff options
author | Aki <nthirtyone@gmail.com> | 2017-09-21 17:19:42 +0200 |
---|---|---|
committer | Aki <nthirtyone@gmail.com> | 2017-09-21 17:19:42 +0200 |
commit | f60ee890682b9dbecb7dace030862dcdc46d2dc6 (patch) | |
tree | d5b4440fb0413b1c42b67eab47752d62602cec6e /not/Trap.lua | |
parent | 453095b2e0b34cc4bd24671bc8abe6ff9279a318 (diff) | |
download | roflnauts-f60ee890682b9dbecb7dace030862dcdc46d2dc6.zip roflnauts-f60ee890682b9dbecb7dace030862dcdc46d2dc6.tar.gz roflnauts-f60ee890682b9dbecb7dace030862dcdc46d2dc6.tar.bz2 |
Changed Trap collision category, added category constants to Box2D callbacks
Diffstat (limited to 'not/Trap.lua')
-rw-r--r-- | not/Trap.lua | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/not/Trap.lua b/not/Trap.lua index 47c3f09..2a328d6 100644 --- a/not/Trap.lua +++ b/not/Trap.lua @@ -8,9 +8,9 @@ function Trap:new (direction, x, y, world, imagePath) local mirror = 1 if direction == "left" then mirror = -1 end local fixture = self:addFixture({0, 0, 41 * mirror, 0, 41 * mirror, 18, 0, 18}) - fixture:setCategory(3) - fixture:setMask(1) - fixture:setUserData({0, direction}) + fixture:setCategory(4) + fixture:setMask(1,3,4) + fixture:setUserData({direction}) fixture:setSensor(true) self.mirror = mirror |