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
1 changed files with 6 additions and 0 deletions

View File

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