aboutsummaryrefslogtreecommitdiff
path: root/assets/scripts/mainMenu.lua
diff options
context:
space:
mode:
Diffstat (limited to 'assets/scripts/mainMenu.lua')
-rw-r--r--assets/scripts/mainMenu.lua14
1 files changed, 9 insertions, 5 deletions
diff --git a/assets/scripts/mainMenu.lua b/assets/scripts/mainMenu.lua
index 11c583a..7ed16cc 100644
--- a/assets/scripts/mainMenu.lua
+++ b/assets/scripts/mainMenu.lua
@@ -5,22 +5,27 @@ buttonHeight = 50;
buttonWidth = 110;
bigButtonWidth = 150;
bigButtonHeight = buttonHeight;
+characterSelectType = ""
function Setup()
- setRenderPlayer(false)
setBgImage("assets/backgrounds/city-background-1.png")
end
function Local2PButton()
- reloadWithScript("assets/scripts/local2P.lua")
+ characterSelectType = "Local2P"
+ dofile("assets/scripts/character-select.lua")
+ Setup()
end
function MultiplayerButton()
- -- Add C functions to reset Lua state and re-run Setup with different scripts
+ characterSelectType = "Multiplayer"
+ dofile("assets/scripts/multiplayer.lua")
+ Setup()
end
function SettingsButton()
- -- Add C functions to reset Lua state and re-run Setup with different scripts
+ dofile("assets/scripts/settings.lua")
+ Setup()
end
function Update()
@@ -28,7 +33,6 @@ function Update()
queueButtonForRender("Local 2P", WIDTH // 2 - buttonWidth // 2, HEIGHT // 2 - buttonHeight // 2, buttonWidth, buttonHeight, "Local2PButton");
queueButtonForRender("Multiplayer", WIDTH // 2 - bigButtonWidth // 2, HEIGHT // 2 - bigButtonHeight // 2 + 55, bigButtonWidth, bigButtonHeight, "MultiplayerButton");
queueButtonForRender("Settings", WIDTH // 2 - buttonWidth // 2, HEIGHT // 2 - buttonHeight // 2 + 55 + 55, buttonWidth, buttonHeight, "SettingsButton");
-
-- if keys[getKeycodeByName("RIGHT")] or keys[getKeycodeByName("D")] then
-- movePlayer(movementSpeed, 0)
-- end