summaryrefslogtreecommitdiffhomepage
path: root/menu.lua
diff options
context:
space:
mode:
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