summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorAki <nthirtyone@gmail.com>2017-07-20 16:18:30 +0200
committerAki <nthirtyone@gmail.com>2017-07-20 16:18:30 +0200
commitcc352d320bf87f2d9e4ca77497fb452958bab231 (patch)
tree073116df5bd24028f5e3a8661e0d214eff41e0c6
parentca6b363b70117198266022316a4ebfc9c8d1cda8 (diff)
downloadroflnauts-cc352d320bf87f2d9e4ca77497fb452958bab231.zip
roflnauts-cc352d320bf87f2d9e4ca77497fb452958bab231.tar.gz
roflnauts-cc352d320bf87f2d9e4ca77497fb452958bab231.tar.bz2
Added initial name tags above Heroes
-rw-r--r--not/Hero.lua3
1 files changed, 3 insertions, 0 deletions
diff --git a/not/Hero.lua b/not/Hero.lua
index 5c3d9f4..e8fa206 100644
--- a/not/Hero.lua
+++ b/not/Hero.lua
@@ -169,6 +169,9 @@ end
function Hero:draw (offset_x, offset_y, scale, debug)
if not self.isAlive then return end
Hero.__super.draw(self, offset_x, offset_y, scale, debug)
+ love.graphics.setFont(Font)
+ local x,y = self:getPosition()
+ love.graphics.printf(string.format("Player %d", math.abs(self.group)), (math.floor(x)+offset_x)*scale, (math.floor(y)+offset_y-26)*scale,100,'center',0,scale,scale,50,0)
end
-- Draw HUD of `Hero`