diff --git a/Main Menu.tscn b/Main Menu.tscn index 7612bf0..73a1716 100644 --- a/Main Menu.tscn +++ b/Main Menu.tscn @@ -1,6 +1,8 @@ -[gd_scene load_steps=3 format=3 uid="uid://bmvb0o7ohxcfd"] +[gd_scene load_steps=5 format=3 uid="uid://bmvb0o7ohxcfd"] [ext_resource type="Texture2D" uid="uid://yqukd7l5xsxg" path="res://Cat on news.PNG" id="1_5b7ti"] +[ext_resource type="Script" uid="uid://dseq7dsrcpds6" path="res://start_game.gd" id="1_i5qic"] +[ext_resource type="Script" uid="uid://br2tmqcmfkf7a" path="res://exit_game.gd" id="2_12kdf"] [sub_resource type="SystemFont" id="SystemFont_7yr4w"] @@ -12,7 +14,7 @@ anchor_bottom = 1.0 grow_horizontal = 2 grow_vertical = 2 -[node name="Button" type="Button" parent="."] +[node name="Start button" type="Button" parent="."] layout_mode = 0 offset_left = 367.0 offset_top = 168.0 @@ -21,8 +23,9 @@ offset_bottom = 246.0 theme_override_fonts/font = SubResource("SystemFont_7yr4w") theme_override_font_sizes/font_size = 51 text = "Start" +script = ExtResource("1_i5qic") -[node name="Button2" type="Button" parent="."] +[node name="Exit button" type="Button" parent="."] offset_left = 368.0 offset_top = 332.0 offset_right = 778.0 @@ -30,9 +33,13 @@ offset_bottom = 410.0 theme_override_fonts/font = SubResource("SystemFont_7yr4w") theme_override_font_sizes/font_size = 51 text = "Exit" +script = ExtResource("2_12kdf") -[node name="Sprite2D" type="Sprite2D" parent="."] +[node name="Background" type="Sprite2D" parent="."] z_index = -100 position = Vector2(578.503, 288.125) scale = Vector2(2.71364, 2.71364) texture = ExtResource("1_5b7ti") + +[connection signal="pressed" from="Start button" to="Start button" method="_on_pressed"] +[connection signal="pressed" from="Exit button" to="Exit button" method="_on_pressed"] diff --git a/README.md b/README.md index a80d5e5..2724c2c 100644 --- a/README.md +++ b/README.md @@ -1,2 +1 @@ # GameJam - diff --git a/exit_game.gd b/exit_game.gd new file mode 100644 index 0000000..06f1d38 --- /dev/null +++ b/exit_game.gd @@ -0,0 +1,4 @@ +extends Button + +func _on_pressed() -> void: + get_tree().quit() diff --git a/exit_game.gd.uid b/exit_game.gd.uid new file mode 100644 index 0000000..4b58518 --- /dev/null +++ b/exit_game.gd.uid @@ -0,0 +1 @@ +uid://br2tmqcmfkf7a diff --git a/project.godot b/project.godot index c4ca683..183815f 100644 --- a/project.godot +++ b/project.godot @@ -11,5 +11,6 @@ config_version=5 [application] config/name="The crystaline adventure" +run/main_scene="uid://bmvb0o7ohxcfd" config/features=PackedStringArray("4.4", "Forward Plus") config/icon="res://icon.svg" diff --git a/start_game.gd b/start_game.gd new file mode 100644 index 0000000..c11689f --- /dev/null +++ b/start_game.gd @@ -0,0 +1,4 @@ +extends Button + +func _on_pressed() -> void: + get_tree().change_scene_to_file("res://startLevel.tscn") diff --git a/start_game.gd.uid b/start_game.gd.uid new file mode 100644 index 0000000..198f2eb --- /dev/null +++ b/start_game.gd.uid @@ -0,0 +1 @@ +uid://dseq7dsrcpds6