diff options
author | Aki <nthirtyone@gmail.com> | 2017-09-12 19:27:32 +0200 |
---|---|---|
committer | Aki <nthirtyone@gmail.com> | 2017-09-12 19:27:32 +0200 |
commit | c201bef4950138bd8c475d9b8cd1c26e0615145a (patch) | |
tree | af7f92f17b6eb1a8c72ed9bd3ba34e3455834b97 /not/Hero.lua | |
parent | 6094b7eb9cbe915e02e02908b77549223f585014 (diff) | |
download | roflnauts-c201bef4950138bd8c475d9b8cd1c26e0615145a.zip roflnauts-c201bef4950138bd8c475d9b8cd1c26e0615145a.tar.gz roflnauts-c201bef4950138bd8c475d9b8cd1c26e0615145a.tar.bz2 |
Removed obsolete offsets and scale from draw of Sprites and children
Diffstat (limited to 'not/Hero.lua')
-rw-r--r-- | not/Hero.lua | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/not/Hero.lua b/not/Hero.lua index 15cc667..66bc511 100644 --- a/not/Hero.lua +++ b/not/Hero.lua @@ -165,17 +165,17 @@ function Hero:getOffset () return 12,15 end --- Draw of `Hero` -function Hero:draw (offset_x, offset_y, scale, debug) +function Hero:draw (debug) if not self.isAlive then return end - Hero.__super.draw(self, offset_x, offset_y, scale, debug) + Hero.__super.draw(self, debug) end -function Hero:drawTag (offset_x, offset_y, scale) +-- TODO: Hero@drawTag's printf is not readable. +function Hero:drawTag () local x,y = self:getPosition() love.graphics.setFont(Font) love.graphics.setColor(255, 255, 255) - 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) + love.graphics.printf(string.format("Player %d", math.abs(self.group)), math.floor(x), math.floor(y)-26 ,100,'center',0,1,1,50,0) end -- Draw HUD of `Hero` |