1
Fork 0
mirror of https://github.com/Steffo99/hella-farm.git synced 2024-10-16 22:37:34 +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].
func build_game() -> void:
scene_game = SCENE_GAME.instantiate()
scene_game.selected_exit.connect(_on_game_selected_exit)
container.add_child(scene_game)
add_child(scene_game)
func _ready() -> void:
current_stage = starting_stage
@ -85,3 +84,9 @@ func _on_menu_selected_options() -> void:
func _on_game_selected_exit() -> void:
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"]
script = ExtResource("1_jyg3q")
starting_stage = 1
starting_stage = 3
[node name="PrimaryCanvas" type="CanvasLayer" parent="."]