diff options
author | Aki <nthirtyone@gmail.com> | 2017-07-18 06:44:16 +0200 |
---|---|---|
committer | Aki <nthirtyone@gmail.com> | 2017-07-18 06:44:16 +0200 |
commit | 0774fe93cb125e2b3d37904b2c32f9e490d432f7 (patch) | |
tree | c401b155fe93d1241f4ff61ec86e430a2c391a5a | |
parent | b6aad58259b1e71913280d30e2c9dbf4ecf264c3 (diff) | |
download | roflnauts-0774fe93cb125e2b3d37904b2c32f9e490d432f7.zip roflnauts-0774fe93cb125e2b3d37904b2c32f9e490d432f7.tar.gz roflnauts-0774fe93cb125e2b3d37904b2c32f9e490d432f7.tar.bz2 |
Renamed few more poperties in Hero which are used the same way as statics
-rw-r--r-- | not/Hero.lua | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/not/Hero.lua b/not/Hero.lua index d9b0636..729826d 100644 --- a/not/Hero.lua +++ b/not/Hero.lua @@ -3,14 +3,13 @@ -- Collision category: [2] Hero = require "not.PhysicalBody":extends() --- Movement +-- Few are left... Hero.jumpTimer = 0.16 Hero.jumpCounter = 2 --- Statics -Hero.portrait_sheet = getNautsIconsList() -Hero.portrait_box = love.graphics.newQuad(0, 15, 32,32, 80,130) Hero.sfx = require "config.sounds" +Hero.QUAD_PORTRAITS = getNautsIconsList() +Hero.QUAD_FRAME = love.graphics.newQuad(0, 15, 32,32, 80,130) Hero.IMAGE_PORTRAITS = nil Hero.IMAGE_FRAME = nil Hero.MAX_VELOCITY = 105 @@ -178,8 +177,8 @@ function Hero:drawHUD (x,y,scale,elevation) -- hud displays only if player is alive if self.isAlive then love.graphics.setColor(255,255,255,255) - love.graphics.draw(self.IMAGE_FRAME, self.portrait_box, (x)*scale, (y)*scale, 0, scale, scale) - love.graphics.draw(self.IMAGE_PORTRAITS, self.portrait_sheet[self.name], (x+2)*scale, (y+3)*scale, 0, scale, scale) + love.graphics.draw(self.IMAGE_FRAME, self.QUAD_FRAME, (x)*scale, (y)*scale, 0, scale, scale) + love.graphics.draw(self.IMAGE_PORTRAITS, self.QUAD_PORTRAITS[self.name], (x+2)*scale, (y+3)*scale, 0, scale, scale) local dy = 30 * elevation love.graphics.setFont(Font) love.graphics.print((self.combo).."%",(x+2)*scale,(y-3+dy)*scale,0,scale,scale) |