1
Fork 0
mirror of https://github.com/Steffo99/hella-farm.git synced 2024-11-22 08:04:23 +00:00

Fix a few things in the Main scene

This commit is contained in:
Steffo 2024-04-14 05:40:07 +02:00
parent c8fb1e0c67
commit 1a67612209
Signed by: steffo
GPG key ID: 5ADA3868646C3FC0
2 changed files with 8 additions and 3 deletions

View file

@ -71,8 +71,7 @@ func destroy_game() -> void:
## Build the [MainGame]. ## Build the [MainGame].
func build_game() -> void: func build_game() -> void:
scene_game = SCENE_GAME.instantiate() scene_game = SCENE_GAME.instantiate()
scene_game.selected_exit.connect(_on_game_selected_exit) add_child(scene_game)
container.add_child(scene_game)
func _ready() -> void: func _ready() -> void:
current_stage = starting_stage current_stage = starting_stage
@ -85,3 +84,9 @@ func _on_menu_selected_options() -> void:
func _on_game_selected_exit() -> void: func _on_game_selected_exit() -> void:
current_stage = Stage.MENU current_stage = Stage.MENU
func _input(event: InputEvent) -> void:
Log.p(self, "Received input event: %s" % event)
if event is InputEventKey:
if event.is_action(&"ui_home"):
current_stage = Stage.MENU

View file

@ -5,7 +5,7 @@
[node name="Main" type="Node"] [node name="Main" type="Node"]
script = ExtResource("1_jyg3q") script = ExtResource("1_jyg3q")
starting_stage = 1 starting_stage = 3
[node name="PrimaryCanvas" type="CanvasLayer" parent="."] [node name="PrimaryCanvas" type="CanvasLayer" parent="."]