fix(examples): adapt to the new hitbox system
This commit is contained in:
parent
8c1e9d8e05
commit
b770253cb5
1 changed files with 7 additions and 1 deletions
|
@ -62,10 +62,16 @@ end
|
||||||
|
|
||||||
function Player:collisionResponse(collision)
|
function Player:collisionResponse(collision)
|
||||||
if collision.other.type == "coin" then
|
if collision.other.type == "coin" then
|
||||||
collision.other:takeCoin(self)
|
collision.other.owner:takeCoin(self)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
function Player:draw()
|
||||||
|
Player.super.draw(self)
|
||||||
|
self:drawMainHitbox()
|
||||||
|
utils.graphics.resetColor()
|
||||||
|
end
|
||||||
|
|
||||||
function Player:drawHUD(id)
|
function Player:drawHUD(id)
|
||||||
love.graphics.print(id .. " test", 4, 4)
|
love.graphics.print(id .. " test", 4, 4)
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue