summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorAki <nthirtyone@gmail.com>2016-07-20 08:48:21 +0200
committerAki <nthirtyone@gmail.com>2016-07-20 08:48:21 +0200
commit63376362bacf2e02b094b0dea424d393f383f730 (patch)
tree1f77f50f62bdbc3c983d8049beb8c046d0675c5b
parent208a534b5c17914152097333b4b69e43289ae614 (diff)
downloadroflnauts-63376362bacf2e02b094b0dea424d393f383f730.zip
roflnauts-63376362bacf2e02b094b0dea424d393f383f730.tar.gz
roflnauts-63376362bacf2e02b094b0dea424d393f383f730.tar.bz2
Countdown's initials
-rw-r--r--menu.lua10
1 files changed, 5 insertions, 5 deletions
diff --git a/menu.lua b/menu.lua
index a2a4b0b..5371265 100644
--- a/menu.lua
+++ b/menu.lua
@@ -16,7 +16,7 @@ Menu = {
portrait_sprite = nil,
portrait_sheet = require "portraits",
scale = getScale(),
- countdown = 6,
+ countdown = 10,
header_move = 0
}
@@ -69,7 +69,7 @@ function Menu:draw()
local countdown, _ = math.modf(self.countdown)
local w, h = love.graphics.getWidth()/self.scale, love.graphics.getHeight()/self.scale
local scale = self.scale
- if self.countdown < 6 then
+ if self.countdown < Menu.countdown then -- Menu.countdown is initial
love.graphics.setFont(Bold)
love.graphics.print(countdown,(w/2-6.5)*self.scale,(h/2+30)*self.scale,0,self.scale,self.scale)
love.graphics.setFont(Font)
@@ -95,7 +95,7 @@ function Menu:update(dt)
if state then
self.countdown = self.countdown - dt
else
- self.countdown = 6
+ self.countdown = Menu.countdown -- Menu.countdown is initial
end
if state and self.countdown < 0 then
self:startGame()
@@ -109,7 +109,7 @@ end
-- Speed up countdown
function Menu:countdownJump()
- if self.countdown ~= 6 then
+ if self.countdown ~= Menu.countdown then -- Menu.countdown is initial
self.countdown = self.countdown - 1
end
end
@@ -160,6 +160,6 @@ end
-- WARUDO
function Menu:startGame()
- local world = World:new("default", self:getNauts())
+ local world = World:new("emo", self:getNauts())
changeScene(world)
end