summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorAki <nthirtyone@gmail.com>2016-06-14 18:24:08 +0200
committerAki <nthirtyone@gmail.com>2016-06-14 18:24:08 +0200
commit26e9a02a6ec1a285c7ff8c6a01ce21d7ff50215d (patch)
treee41e89542b935912e589eec22ee8bb2fa492124f
parent498e754f7725cbf8e19d60a03b1d7b30fdae823e (diff)
downloadroflnauts-26e9a02a6ec1a285c7ff8c6a01ce21d7ff50215d.zip
roflnauts-26e9a02a6ec1a285c7ff8c6a01ce21d7ff50215d.tar.gz
roflnauts-26e9a02a6ec1a285c7ff8c6a01ce21d7ff50215d.tar.bz2
Speed-up countdown
-rw-r--r--menu.lua7
-rw-r--r--selector.lua2
2 files changed, 9 insertions, 0 deletions
diff --git a/menu.lua b/menu.lua
index ac4d85e..3031e09 100644
--- a/menu.lua
+++ b/menu.lua
@@ -88,6 +88,13 @@ function Menu:update(dt)
end
end
+-- Speed up countdown
+function Menu:countdownJump()
+ if self.countdown ~= 6 then
+ self.countdown = self.countdown - 1
+ end
+end
+
--
function Menu:unselectSelector(selector)
local i = 0
diff --git a/selector.lua b/selector.lua
index 9213f3d..17f76c1 100644
--- a/selector.lua
+++ b/selector.lua
@@ -80,6 +80,8 @@ function Selector:controllerPressed(control, controller)
self.parent:unselectSelector(self)
end
end
+ -- Speed up countdown
+ self.parent:countdownJump()
end
-- It just must be here
function Selector:controllerReleased(control, controller)