mirror of
https://github.com/Steffo99/hella-farm.git
synced 2024-11-22 16:14:22 +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].
|
## 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
|
||||||
|
|
|
@ -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="."]
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue