summaryrefslogtreecommitdiffhomepage
path: root/menu.lua
diff options
context:
space:
mode:
Diffstat (limited to 'menu.lua')
-rw-r--r--menu.lua14
1 files changed, 9 insertions, 5 deletions
diff --git a/menu.lua b/menu.lua
index 6f0681c..72c2087 100644
--- a/menu.lua
+++ b/menu.lua
@@ -70,7 +70,7 @@ function Menu:update(dt)
self.countdown = 3
end
if state and self.countdown < 0 then
- self.__index = self:startGame()
+ self:startGame()
end
end
@@ -110,12 +110,16 @@ end
function Menu:controllerReleased(control, controller)
end
--- WARUDO
-function Menu:startGame()
+function Menu:getNauts()
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
+ return nauts
+end
+
+-- WARUDO
+function Menu:startGame()
+ local world = World:new("default", self:getNauts())
+ changeScene(world)
end \ No newline at end of file