Made map loading work

This commit is contained in:
2025-08-03 22:40:05 -05:00
parent e0dd14c460
commit 53ad2da596
11 changed files with 88 additions and 34 deletions

View File

@@ -3,6 +3,7 @@ class_name MainMenu extends Control
@export var btnNewGame:Button
@export var btnSettings:Button
@export var settingsMenu:ClosableMenu
@export_file("*.tscn") var newGameScene:String
func _ready() -> void:
btnNewGame.pressed.connect(onNewGamePressed)
@@ -10,6 +11,7 @@ func _ready() -> void:
func onNewGamePressed() -> void:
SCENE.setScene(SceneSingleton.SceneType.OVERWORLD)
OVERWORLD.mapChange(newGameScene, "PlayerSpawnPoint")
func onSettingsPressed() -> void:
print("Settings button pressed")

View File

@@ -15,6 +15,7 @@ script = ExtResource("1_vp3lc")
btnNewGame = NodePath("VBoxContainer/NewGame")
btnSettings = NodePath("VBoxContainer/Settings")
settingsMenu = NodePath("MainMenuSettings")
newGameScene = "uid://b16ysbx7ah03u"
metadata/_custom_type_script = "uid://btfeuku41py2b"
[node name="VBoxContainer" type="VBoxContainer" parent="."]