diff options
author | Aki <nthirtyone@gmail.com> | 2016-06-20 22:29:19 +0200 |
---|---|---|
committer | Aki <nthirtyone@gmail.com> | 2016-06-20 22:29:19 +0200 |
commit | ba68d7c8cf8f285c2fad92eac86673054e4c5377 (patch) | |
tree | e031b86a59a9563a35f441d70ae06dd28a815a3a | |
parent | 6682bf6962eb24c1763eb69761b7f09951e38441 (diff) | |
download | roflnauts-ba68d7c8cf8f285c2fad92eac86673054e4c5377.zip roflnauts-ba68d7c8cf8f285c2fad92eac86673054e4c5377.tar.gz roflnauts-ba68d7c8cf8f285c2fad92eac86673054e4c5377.tar.bz2 |
Winner
-rw-r--r-- | world.lua | 10 |
1 files changed, 10 insertions, 0 deletions
@@ -163,6 +163,7 @@ function World:createEffect(name, x, y) end -- get Nauts functions +-- more than -1 lives function World:getNautsPlayable() local nauts = {} for _,naut in pairs(self.Nauts) do @@ -173,6 +174,7 @@ function World:getNautsPlayable() return nauts end +-- are alive function World:getNautsAlive() local nauts = {} for _,naut in self.Nauts do @@ -305,6 +307,14 @@ function World:draw() if _ < 3 then y, e = h-33, 0 end naut:drawHUD(1+(_%2)*(w-34), y, scale, e) end + + -- Draw winner + if self.lastNaut then + local w, h = love.graphics.getWidth()/scale, love.graphics.getHeight()/scale + love.graphics.setFont(Bold) + love.graphics.printf("WINNER",(w*0.25)*scale,(20)*scale,(w/2)*scale,"center",0,scale,scale) + love.graphics.setFont(Font) + end end -- beginContact |