diff --git a/examples/gameplay/action3D/actors/player.lua b/examples/gameplay/action3D/actors/player.lua index 85327b8..6d65ddb 100644 --- a/examples/gameplay/action3D/actors/player.lua +++ b/examples/gameplay/action3D/actors/player.lua @@ -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