summaryrefslogtreecommitdiffhomepage
path: root/menu.lua
diff options
context:
space:
mode:
authorAki <nthirtyone@gmail.com>2016-06-01 22:24:38 +0200
committerAki <nthirtyone@gmail.com>2016-06-01 22:24:38 +0200
commit52609cc49d88f5b0d8610b5f6b792f0f423dc735 (patch)
tree4243590824e0f1b88ce3b568c483ef0af0a7b3f9 /menu.lua
parent9ff0d70933474f3a7c50f7c3c0fa52fffaa9cf75 (diff)
downloadroflnauts-52609cc49d88f5b0d8610b5f6b792f0f423dc735.zip
roflnauts-52609cc49d88f5b0d8610b5f6b792f0f423dc735.tar.gz
roflnauts-52609cc49d88f5b0d8610b5f6b792f0f423dc735.tar.bz2
Menu menu menu -- still not complete
Diffstat (limited to 'menu.lua')
-rw-r--r--menu.lua13
1 files changed, 13 insertions, 0 deletions
diff --git a/menu.lua b/menu.lua
index 2e15881..6f0681c 100644
--- a/menu.lua
+++ b/menu.lua
@@ -69,6 +69,9 @@ function Menu:update(dt)
else
self.countdown = 3
end
+ if state and self.countdown < 0 then
+ self.__index = self:startGame()
+ end
end
--
@@ -105,4 +108,14 @@ end
-- It just must be here
function Menu:controllerReleased(control, controller)
+end
+
+-- WARUDO
+function Menu:startGame()
+ local nauts = {}
+ for _,selector in pairs(self.selected) do
+ table.insert(nauts, {selector:getSelectionName(), selector:getController()})
+ end
+ local world = World:new("default", nauts)
+ return world
end \ No newline at end of file