feat(action3D): add collision between coin and player actors

This commit is contained in:
Kazhnuz 2019-07-20 17:46:56 +02:00
parent 54167f8a77
commit eb88c017ea

View file

@ -63,6 +63,12 @@ function Player:setDirection(direction)
end end
end end
function Player:collisionResponse(collision)
if collision.other.type == "coin" then
collision.other.owner:takeCoin(self)
end
end
function Player:draw() function Player:draw()
Player.super.draw(self) Player.super.draw(self)
end end