-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
96 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
extends CenterContainer | ||
|
||
@onready var start_game_button: Button = %StartGameButton | ||
|
||
func _ready() -> void: | ||
start_game_button.grab_focus() | ||
|
||
func _on_start_game_button_pressed() -> void: | ||
await LevelTransition.fade_to_black() | ||
get_tree().change_scene_to_file("res://level_one.tscn") | ||
LevelTransition.fade_from_black() | ||
|
||
func _on_quit_button_pressed() -> void: | ||
get_tree().quit() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
[gd_scene load_steps=2 format=3 uid="uid://du46tm0w2wv6v"] | ||
|
||
[ext_resource type="Script" path="res://start_menu.gd" id="1_dbpd2"] | ||
|
||
[node name="StartMenu" type="CenterContainer"] | ||
anchors_preset = 15 | ||
anchor_right = 1.0 | ||
anchor_bottom = 1.0 | ||
grow_horizontal = 2 | ||
grow_vertical = 2 | ||
script = ExtResource("1_dbpd2") | ||
|
||
[node name="VBoxContainer" type="VBoxContainer" parent="."] | ||
layout_mode = 2 | ||
|
||
[node name="StartGameButton" type="Button" parent="VBoxContainer"] | ||
unique_name_in_owner = true | ||
layout_mode = 2 | ||
text = "Start Game" | ||
|
||
[node name="QuitButton" type="Button" parent="VBoxContainer"] | ||
layout_mode = 2 | ||
text = "Quit" | ||
|
||
[connection signal="pressed" from="VBoxContainer/StartGameButton" to="." method="_on_start_game_button_pressed"] | ||
[connection signal="pressed" from="VBoxContainer/QuitButton" to="." method="_on_quit_button_pressed"] |