mirror of
https://github.com/Steffo99/hella-farm.git
synced 2024-11-21 23:54:23 +00:00
Fix a few things in the Main
scene
This commit is contained in:
parent
c8fb1e0c67
commit
1a67612209
2 changed files with 8 additions and 3 deletions
9
main.gd
9
main.gd
|
@ -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
|
||||
|
|
|
@ -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="."]
|
||||
|
||||
|
|
Loading…
Reference in a new issue