diff --git a/obj/game/Player.lua b/obj/game/Player.lua index b39de92..4afff8d 100644 --- a/obj/game/Player.lua +++ b/obj/game/Player.lua @@ -7,6 +7,9 @@ local Player = GameObject:extend() function Player:new(area, x, y, opts) Player.super.new(self, area, x, y, opts) + + self.w, self.h = 12, 12 + self.collider = self.area.world:circle(self.x, self.y, math.floor(self.w*0.8)) end function Player:update(dt) @@ -15,6 +18,10 @@ end function Player:draw() Player.super.draw(self) + love.graphics.setColor(1, 0.4, 0.4) + self.collider:draw() + love.graphics.setColor(1, 1, 1) + love.graphics.circle('line', self.x, self.y, self.w) end return Player