From b770253cb591e09a6810a8b2f59703bb1318932c Mon Sep 17 00:00:00 2001 From: Kazhnuz Date: Sat, 22 Jun 2019 19:28:28 +0200 Subject: [PATCH] fix(examples): adapt to the new hitbox system --- examples/gameplay/plateform/actors/player.lua | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/examples/gameplay/plateform/actors/player.lua b/examples/gameplay/plateform/actors/player.lua index 74b0173..b2c5322 100644 --- a/examples/gameplay/plateform/actors/player.lua +++ b/examples/gameplay/plateform/actors/player.lua @@ -62,10 +62,16 @@ end function Player:collisionResponse(collision) if collision.other.type == "coin" then - collision.other:takeCoin(self) + collision.other.owner:takeCoin(self) end end +function Player:draw() + Player.super.draw(self) + self:drawMainHitbox() + utils.graphics.resetColor() +end + function Player:drawHUD(id) love.graphics.print(id .. " test", 4, 4) end