summaryrefslogtreecommitdiffhomepage
path: root/world.lua
diff options
context:
space:
mode:
Diffstat (limited to 'world.lua')
-rw-r--r--world.lua10
1 files changed, 10 insertions, 0 deletions
diff --git a/world.lua b/world.lua
index cec9f52..8e437a7 100644
--- a/world.lua
+++ b/world.lua
@@ -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