diff options
| author | Radio <radiohotline@disroot.org> | 2026-05-31 00:17:01 +0300 |
|---|---|---|
| committer | Radio <radiohotline@disroot.org> | 2026-05-31 00:17:01 +0300 |
| commit | 7f437327b25be23b1cdcd4aa3898d428421e533f (patch) | |
| tree | 555cece0119bd0673712cd4304a3a28ba0cc3c82 /scenes | |
| parent | 9d87bc7922f76dc835ac4d4e99115b204cbfdea7 (diff) | |
menu fixes, options menu, and movement mechanic
Diffstat (limited to 'scenes')
| -rw-r--r-- | scenes/char/weener.gd | 35 | ||||
| -rw-r--r-- | scenes/char/weener.gd.uid | 1 | ||||
| -rw-r--r-- | scenes/char/weener.tscn | 101 | ||||
| -rw-r--r-- | scenes/item/item.tscn | 14 | ||||
| -rw-r--r-- | scenes/room/kitchen.tscn | 29 | ||||
| -rw-r--r-- | scenes/room/room.tscn | 13 | ||||
| -rw-r--r-- | scenes/room/start.tscn | 32 | ||||
| -rw-r--r-- | scenes/ui/menu.gd | 36 | ||||
| -rw-r--r-- | scenes/ui/menu.tscn | 37 | ||||
| -rw-r--r-- | scenes/ui/options.gd | 5 | ||||
| -rw-r--r-- | scenes/ui/options.tscn | 3 | ||||
| -rw-r--r-- | scenes/ui/title.tscn | 30 | ||||
| -rw-r--r-- | scenes/ui/title_button.gd | 20 | ||||
| -rw-r--r-- | scenes/ui/title_button.gd.uid | 1 |
14 files changed, 301 insertions, 56 deletions
diff --git a/scenes/char/weener.gd b/scenes/char/weener.gd new file mode 100644 index 0000000..f4f9e38 --- /dev/null +++ b/scenes/char/weener.gd @@ -0,0 +1,35 @@ +extends CharacterBody2D + +@onready var sprite := $Sprite +@onready var nav2d := $NavigationAgent2D + +const ref_speed := 500.0 +@onready var speed := ref_speed +@onready var target := position + +func _physics_process(delta: float) -> void: + set_target() + navigate(delta) + + +func set_target() -> void: + if Input.is_action_just_pressed("set_target"): + nav2d.target_position = get_global_mouse_position() + if position.distance_to(nav2d.target_position) > 750: + speed = ref_speed * 1.8 + else: + speed = ref_speed + + +func navigate(delta: float) -> void: + if nav2d.is_navigation_finished(): + sprite.play("stand") + return + var next_path_position: Vector2 = nav2d.get_next_path_position() + velocity = global_position.direction_to(next_path_position) * speed + sprite.flip_h = velocity.x > 0 + position += velocity * delta + if speed > ref_speed: + sprite.play("run") + else: + sprite.play("walk") diff --git a/scenes/char/weener.gd.uid b/scenes/char/weener.gd.uid new file mode 100644 index 0000000..170ef28 --- /dev/null +++ b/scenes/char/weener.gd.uid @@ -0,0 +1 @@ +uid://bmudq0wqybjnw diff --git a/scenes/char/weener.tscn b/scenes/char/weener.tscn new file mode 100644 index 0000000..c8164fe --- /dev/null +++ b/scenes/char/weener.tscn @@ -0,0 +1,101 @@ +[gd_scene format=3 uid="uid://bt4utdbe577mj"] + +[ext_resource type="Script" uid="uid://bmudq0wqybjnw" path="res://scenes/char/weener.gd" id="1_5hljh"] +[ext_resource type="Texture2D" uid="uid://bje5rius281oi" path="res://spr/weener/crouch.png" id="1_6smxx"] +[ext_resource type="Texture2D" uid="uid://dk3ulxm2i0qm6" path="res://spr/weener/stand.png" id="1_b3dvs"] +[ext_resource type="Texture2D" uid="uid://cr80vs56knlqh" path="res://spr/weener/grab.png" id="1_ka3oh"] +[ext_resource type="Texture2D" uid="uid://bbcs52esee2pt" path="res://spr/weener/walk.png" id="2_tfg2r"] +[ext_resource type="Texture2D" uid="uid://b1bn5hf6uxfiw" path="res://spr/weener/run1.png" id="5_rsd08"] +[ext_resource type="Texture2D" uid="uid://0pued7jac5i2" path="res://spr/weener/run2.png" id="6_xgxdw"] + +[sub_resource type="SpriteFrames" id="SpriteFrames_ka3oh"] +animations = [{ +"frames": [{ +"duration": 1.0, +"texture": ExtResource("1_6smxx") +}], +"loop": true, +"name": &"crouch", +"speed": 5.0 +}, { +"frames": [{ +"duration": 1.0, +"texture": ExtResource("1_ka3oh") +}, { +"duration": 1.0, +"texture": ExtResource("1_b3dvs") +}, { +"duration": 1.0, +"texture": ExtResource("1_b3dvs") +}], +"loop": false, +"name": &"grab", +"speed": 2.0 +}, { +"frames": [{ +"duration": 1.0, +"texture": ExtResource("5_rsd08") +}, { +"duration": 1.0, +"texture": ExtResource("1_b3dvs") +}, { +"duration": 1.0, +"texture": ExtResource("6_xgxdw") +}, { +"duration": 1.0, +"texture": ExtResource("1_b3dvs") +}], +"loop": true, +"name": &"run", +"speed": 5.0 +}, { +"frames": [{ +"duration": 1.0, +"texture": ExtResource("1_b3dvs") +}], +"loop": false, +"name": &"stand", +"speed": 5.0 +}, { +"frames": [{ +"duration": 1.0, +"texture": ExtResource("2_tfg2r") +}, { +"duration": 1.0, +"texture": ExtResource("1_b3dvs") +}], +"loop": true, +"name": &"walk", +"speed": 3.0 +}] + +[sub_resource type="RectangleShape2D" id="RectangleShape2D_rsd08"] +size = Vector2(44, 109.5) + +[node name="Weener" type="CharacterBody2D" unique_id=1834042649] +script = ExtResource("1_5hljh") + +[node name="Sprite" type="AnimatedSprite2D" parent="." unique_id=918466208] +position = Vector2(0, -190) +sprite_frames = SubResource("SpriteFrames_ka3oh") +animation = &"stand" +autoplay = "stand" + +[node name="CollisionShape2D" type="CollisionShape2D" parent="." unique_id=1548923938] +rotation = 1.5707964 +shape = SubResource("RectangleShape2D_rsd08") + +[node name="NavigationAgent2D" type="NavigationAgent2D" parent="." unique_id=2038637548] +debug_enabled = true + +[node name="Debug" type="Label" parent="." unique_id=999070759] +visible = false +anchors_preset = 5 +anchor_left = 0.5 +anchor_right = 0.5 +offset_left = -20.0 +offset_top = -502.0 +offset_right = 20.0 +offset_bottom = -479.0 +grow_horizontal = 2 +size_flags_vertical = 0 diff --git a/scenes/item/item.tscn b/scenes/item/item.tscn new file mode 100644 index 0000000..a8c3dda --- /dev/null +++ b/scenes/item/item.tscn @@ -0,0 +1,14 @@ +[gd_scene format=3 uid="uid://xn4bxjj1vuim"] + +[ext_resource type="Texture2D" uid="uid://det86lqkb5y4p" path="res://room/start/testprop.png" id="1_vcqat"] + +[sub_resource type="CircleShape2D" id="CircleShape2D_vijbe"] +radius = 77.00649 + +[node name="Item" type="StaticBody2D" unique_id=724668915] + +[node name="Sprite" type="Sprite2D" parent="." unique_id=89747108] +texture = ExtResource("1_vcqat") + +[node name="CollisionShape2D" type="CollisionShape2D" parent="." unique_id=574625641] +shape = SubResource("CircleShape2D_vijbe") diff --git a/scenes/room/kitchen.tscn b/scenes/room/kitchen.tscn new file mode 100644 index 0000000..5284629 --- /dev/null +++ b/scenes/room/kitchen.tscn @@ -0,0 +1,29 @@ +[gd_scene format=3 uid="uid://c40vhh8wtss4b"] + +[ext_resource type="PackedScene" uid="uid://b1s6v121kb2mi" path="res://scenes/room/room.tscn" id="1_4qnmt"] +[ext_resource type="Texture2D" uid="uid://domalafsxaubx" path="res://room/kitchen/kitchen.png" id="2_6oufn"] + +[sub_resource type="NavigationPolygon" id="NavigationPolygon_6oufn"] +vertices = PackedVector2Array(856.2578, 1032.0703, 817.2578, 913.3281, 916.02344, 900.28906, 1515.4922, 1038.9609, 1701.0469, 888.5078, 1123.5625, 563.03906, 1748.4766, 567.9219, 1755.3672, 703.6172, 1910, 916.5625, 1910, 748.5) +polygons = Array[PackedInt32Array]([PackedInt32Array(0, 1, 2, 3), PackedInt32Array(4, 3, 2, 5, 6, 7), PackedInt32Array(8, 4, 7, 9)]) +outlines = Array[PackedVector2Array]([PackedVector2Array(1704, 899, 1519, 1049, 849, 1042, 804, 905, 910, 891, 1118, 553, 1758, 558, 1765, 696, 1920, 741, 1920, 928)]) + +[sub_resource type="RectangleShape2D" id="RectangleShape2D_6oufn"] +size = Vector2(170, 232) + +[node name="Kitchen" unique_id=2088608692 instance=ExtResource("1_4qnmt")] + +[node name="Room" parent="." index="0" unique_id=1997957082] +texture = ExtResource("2_6oufn") + +[node name="Weener" parent="." index="1" unique_id=1834042649] +position = Vector2(1671, 837) + +[node name="NavigationRegion2D" parent="." index="2" unique_id=1498960834] +navigation_polygon = SubResource("NavigationPolygon_6oufn") + +[node name="Bedroom" type="Area2D" parent="." index="3" unique_id=904050755] + +[node name="CollisionShape2D" type="CollisionShape2D" parent="Bedroom" index="0" unique_id=1414369935] +position = Vector2(1845, 819) +shape = SubResource("RectangleShape2D_6oufn") diff --git a/scenes/room/room.tscn b/scenes/room/room.tscn new file mode 100644 index 0000000..6c867d8 --- /dev/null +++ b/scenes/room/room.tscn @@ -0,0 +1,13 @@ +[gd_scene format=3 uid="uid://b1s6v121kb2mi"] + +[ext_resource type="PackedScene" uid="uid://bt4utdbe577mj" path="res://scenes/char/weener.tscn" id="2_vaubn"] + +[node name="Room" type="Node2D" unique_id=2088608692] + +[node name="Room" type="Sprite2D" parent="." unique_id=1997957082] +centered = false + +[node name="Weener" parent="." unique_id=1834042649 instance=ExtResource("2_vaubn")] +position = Vector2(1127, 956) + +[node name="NavigationRegion2D" type="NavigationRegion2D" parent="." unique_id=1498960834] diff --git a/scenes/room/start.tscn b/scenes/room/start.tscn index b7ad877..32a8bcd 100644 --- a/scenes/room/start.tscn +++ b/scenes/room/start.tscn @@ -1,9 +1,41 @@ [gd_scene format=3 uid="uid://cec247tmm7ait"] [ext_resource type="Texture2D" uid="uid://cfn3ctcvyfjn0" path="res://room/start/room.jpg" id="1_ft2pm"] +[ext_resource type="PackedScene" uid="uid://bt4utdbe577mj" path="res://scenes/char/weener.tscn" id="2_d0alr"] +[ext_resource type="PackedScene" uid="uid://xn4bxjj1vuim" path="res://scenes/item/item.tscn" id="3_uxhtn"] + +[sub_resource type="RectangleShape2D" id="RectangleShape2D_q15md"] +size = Vector2(125.15787, 285.6711) + +[sub_resource type="NavigationPolygon" id="NavigationPolygon_d0alr"] +vertices = PackedVector2Array(10, 824.25, 195.53125, 763.6328, 211.64844, 814.03125, 10, 1070, 1738.7969, 863.5625, 1910, 981.2578, 1910, 1070, 699.8828, 843, 1180.5234, 843, 344.52344, 807.15625, 619.5703, 725.96094, 674.9297, 724.25, 1243.9688, 699.21875, 1524.6563, 749.5469, 302.3672, 769.89844) +polygons = Array[PackedInt32Array]([PackedInt32Array(0, 1, 2, 3), PackedInt32Array(4, 5, 6, 3, 7, 8), PackedInt32Array(9, 10, 11, 7, 3), PackedInt32Array(8, 12, 13, 4), PackedInt32Array(2, 14, 9, 3)]) +outlines = Array[PackedVector2Array]([PackedVector2Array(202, 751, 217.65723, 799.9918, 304, 758, 347, 796, 618, 716, 683, 714, 708, 833, 1174, 833, 1238, 688, 1528, 740, 1744, 855, 1920, 976, 1920, 1080, 0, 1080, 0, 817)]) [node name="Start" type="Node2D" unique_id=2088608692] [node name="Room" type="Sprite2D" parent="." unique_id=1997957082] texture = ExtResource("1_ft2pm") centered = false + +[node name="Kitchen" type="StaticBody2D" parent="." unique_id=357217904] +collision_layer = 0 +collision_mask = 0 + +[node name="CollisionShape2D" type="CollisionShape2D" parent="Kitchen" unique_id=727728769] +position = Vector2(93.75002, 862.75) +rotation = 0.7853982 +scale = Vector2(0.9999999, 0.9999999) +shape = SubResource("RectangleShape2D_q15md") + +[node name="Weener" parent="." unique_id=1834042649 instance=ExtResource("2_d0alr")] +position = Vector2(1127, 956) + +[node name="NavigationRegion2D" type="NavigationRegion2D" parent="." unique_id=1498960834] +navigation_polygon = SubResource("NavigationPolygon_d0alr") + +[node name="Item" parent="." unique_id=724668915 instance=ExtResource("3_uxhtn")] +position = Vector2(1626, 608) + +[node name="Item2" parent="." unique_id=1487046604 instance=ExtResource("3_uxhtn")] +position = Vector2(394, 458) diff --git a/scenes/ui/menu.gd b/scenes/ui/menu.gd index 16882a4..a60336b 100644 --- a/scenes/ui/menu.gd +++ b/scenes/ui/menu.gd @@ -1,20 +1,42 @@ extends CanvasLayer -var menu: CanvasLayer +func pause() -> void: + Menu.visible = true + get_tree().paused = true + + +func resume() -> void: + Menu.visible = false + get_tree().paused = false + + +func _ready() -> void: + resume() + func _input(event: InputEvent) -> void: - if event.is_action_pressed("ui_menu"): - if menu: - menu.queue_free() - menu = null + if event.is_action_pressed("ui_menu") and get_tree().current_scene.scene_file_path != "res://scenes/ui/title.tscn": + if get_tree().paused: + resume() else: - menu = load("uid://dqhxjaxlgy4yf").instantiate() - add_child(menu) + pause() +func _on_start_pressed() -> void: + get_tree().change_scene_to_file("res://scenes/room/start.tscn") + func _on_main_menu_pressed() -> void: + resume() get_tree().change_scene_to_file("res://scenes/ui/title.tscn") func _on_quit_pressed() -> void: get_tree().quit() + + +func _on_options_pressed() -> void: + if !has_node("Options"): + var options = load("res://scenes/ui/options.tscn").instantiate() + add_child(options) + options.menu_node = self + process_mode = Node.PROCESS_MODE_DISABLED diff --git a/scenes/ui/menu.tscn b/scenes/ui/menu.tscn index 37d83d5..cc25d7b 100644 --- a/scenes/ui/menu.tscn +++ b/scenes/ui/menu.tscn @@ -3,9 +3,18 @@ [ext_resource type="Script" uid="uid://befvsvog6282s" path="res://scenes/ui/menu.gd" id="1_wedc3"] [ext_resource type="PackedScene" uid="uid://dj2dk1g7jnk23" path="res://scenes/ui/title_button.tscn" id="2_c2n5p"] -[node name="CanvasLayer" type="CanvasLayer" unique_id=1450802124] +[node name="Menu" type="CanvasLayer" unique_id=1912348469] +process_mode = 3 script = ExtResource("1_wedc3") +[node name="ColorRect" type="ColorRect" parent="." unique_id=1816673840] +anchors_preset = 15 +anchor_right = 1.0 +anchor_bottom = 1.0 +grow_horizontal = 2 +grow_vertical = 2 +color = Color(0, 0, 0, 0.60784316) + [node name="Menu" type="Control" parent="." unique_id=115089705] layout_mode = 3 anchors_preset = 8 @@ -18,7 +27,7 @@ grow_vertical = 2 size_flags_horizontal = 4 size_flags_vertical = 4 -[node name="VBoxContainer" type="VBoxContainer" parent="Menu" unique_id=604076564] +[node name="PanelContainer" type="PanelContainer" parent="Menu" unique_id=1414562164] layout_mode = 1 anchors_preset = 8 anchor_left = 0.5 @@ -26,38 +35,42 @@ anchor_top = 0.5 anchor_right = 0.5 anchor_bottom = 0.5 offset_left = -260.5 -offset_top = -294.0 +offset_top = -318.25 offset_right = 260.5 -offset_bottom = 294.0 +offset_bottom = 318.25 grow_horizontal = 2 grow_vertical = 2 -[node name="Label" type="Label" parent="Menu/VBoxContainer" unique_id=1102397096] +[node name="VBoxContainer" type="VBoxContainer" parent="Menu/PanelContainer" unique_id=604076564] +layout_mode = 2 + +[node name="Label" type="Label" parent="Menu/PanelContainer/VBoxContainer" unique_id=1102397096] layout_mode = 2 theme_override_font_sizes/font_size = 100 text = "MENU!!!!!!!!" horizontal_alignment = 1 uppercase = true -[node name="Save" parent="Menu/VBoxContainer" unique_id=1597537067 instance=ExtResource("2_c2n5p")] +[node name="Save" parent="Menu/PanelContainer/VBoxContainer" unique_id=1597537067 instance=ExtResource("2_c2n5p")] layout_mode = 2 text = "Save" -[node name="Load" parent="Menu/VBoxContainer" unique_id=1726486889 instance=ExtResource("2_c2n5p")] +[node name="Load" parent="Menu/PanelContainer/VBoxContainer" unique_id=1726486889 instance=ExtResource("2_c2n5p")] layout_mode = 2 text = "Load" -[node name="Options" parent="Menu/VBoxContainer" unique_id=674602521 instance=ExtResource("2_c2n5p")] +[node name="Options" parent="Menu/PanelContainer/VBoxContainer" unique_id=674602521 instance=ExtResource("2_c2n5p")] layout_mode = 2 text = "Options" -[node name="Main Menu" parent="Menu/VBoxContainer" unique_id=1904714546 instance=ExtResource("2_c2n5p")] +[node name="Main Menu" parent="Menu/PanelContainer/VBoxContainer" unique_id=1904714546 instance=ExtResource("2_c2n5p")] layout_mode = 2 text = "Main Menu" -[node name="Quit" parent="Menu/VBoxContainer" unique_id=1892162088 instance=ExtResource("2_c2n5p")] +[node name="Quit" parent="Menu/PanelContainer/VBoxContainer" unique_id=1892162088 instance=ExtResource("2_c2n5p")] layout_mode = 2 text = "Quit" -[connection signal="pressed" from="Menu/VBoxContainer/Main Menu" to="." method="_on_main_menu_pressed"] -[connection signal="pressed" from="Menu/VBoxContainer/Quit" to="." method="_on_quit_pressed"] +[connection signal="pressed" from="Menu/PanelContainer/VBoxContainer/Options" to="." method="_on_options_pressed"] +[connection signal="pressed" from="Menu/PanelContainer/VBoxContainer/Main Menu" to="." method="_on_main_menu_pressed"] +[connection signal="pressed" from="Menu/PanelContainer/VBoxContainer/Quit" to="." method="_on_quit_pressed"] diff --git a/scenes/ui/options.gd b/scenes/ui/options.gd index fa4e56a..c172e04 100644 --- a/scenes/ui/options.gd +++ b/scenes/ui/options.gd @@ -1,4 +1,7 @@ extends CanvasLayer +var menu_node: CanvasLayer + func _on_close_pressed() -> void: - + menu_node.process_mode = Node.PROCESS_MODE_ALWAYS + queue_free() diff --git a/scenes/ui/options.tscn b/scenes/ui/options.tscn index 252eccd..f2c0278 100644 --- a/scenes/ui/options.tscn +++ b/scenes/ui/options.tscn @@ -3,7 +3,8 @@ [ext_resource type="PackedScene" uid="uid://dj2dk1g7jnk23" path="res://scenes/ui/title_button.tscn" id="1_ad3a0"] [ext_resource type="Script" uid="uid://ck4twnv274ivh" path="res://scenes/ui/options.gd" id="1_lr2b1"] -[node name="CanvasLayer" type="CanvasLayer" unique_id=1973935756] +[node name="Options" type="CanvasLayer" unique_id=1868787303] +process_mode = 3 script = ExtResource("1_lr2b1") [node name="Control" type="Control" parent="." unique_id=1010669591] diff --git a/scenes/ui/title.tscn b/scenes/ui/title.tscn index 65b44fd..91d47e9 100644 --- a/scenes/ui/title.tscn +++ b/scenes/ui/title.tscn @@ -1,18 +1,20 @@ [gd_scene format=3 uid="uid://c2cmda8vfq0lb"] -[ext_resource type="Script" uid="uid://c5pqgx27uuybk" path="res://scenes/ui/title_button.gd" id="1_g80e2"] +[ext_resource type="Script" uid="uid://befvsvog6282s" path="res://scenes/ui/menu.gd" id="1_g80e2"] [ext_resource type="PackedScene" uid="uid://dj2dk1g7jnk23" path="res://scenes/ui/title_button.tscn" id="1_t6us6"] -[node name="Control" type="Control" unique_id=930849088] +[node name="Title" type="CanvasLayer" unique_id=1428349657] +script = ExtResource("1_g80e2") + +[node name="Control" type="Control" parent="." unique_id=930849088] layout_mode = 3 anchors_preset = 15 anchor_right = 1.0 anchor_bottom = 1.0 grow_horizontal = 2 grow_vertical = 2 -script = ExtResource("1_g80e2") -[node name="MarginContainer2" type="MarginContainer" parent="." unique_id=22126455] +[node name="Title" type="MarginContainer" parent="Control" unique_id=22126455] layout_mode = 1 anchors_preset = 5 anchor_left = 0.5 @@ -23,14 +25,14 @@ offset_bottom = 273.0 grow_horizontal = 2 theme_override_constants/margin_top = 50 -[node name="Label" type="Label" parent="MarginContainer2" unique_id=1066740590] +[node name="Label" type="Label" parent="Control/Title" unique_id=1066740590] layout_mode = 2 size_flags_horizontal = 0 theme_override_font_sizes/font_size = 200 text = "MULCH" uppercase = true -[node name="MarginContainer" type="MarginContainer" parent="." unique_id=1839328694] +[node name="MarginContainer" type="MarginContainer" parent="Control" unique_id=1839328694] layout_mode = 1 anchors_preset = 12 anchor_top = 1.0 @@ -44,27 +46,27 @@ theme_override_constants/margin_top = 10 theme_override_constants/margin_right = 10 theme_override_constants/margin_bottom = 10 -[node name="Hbox" type="HBoxContainer" parent="MarginContainer" unique_id=728577623] +[node name="Hbox" type="HBoxContainer" parent="Control/MarginContainer" unique_id=728577623] layout_mode = 2 theme_override_constants/separation = 25 alignment = 1 -[node name="Start" parent="MarginContainer/Hbox" unique_id=1597537067 instance=ExtResource("1_t6us6")] +[node name="Start" parent="Control/MarginContainer/Hbox" unique_id=1597537067 instance=ExtResource("1_t6us6")] layout_mode = 2 text = "Start" -[node name="Load" parent="MarginContainer/Hbox" unique_id=1936574972 instance=ExtResource("1_t6us6")] +[node name="Load" parent="Control/MarginContainer/Hbox" unique_id=1936574972 instance=ExtResource("1_t6us6")] layout_mode = 2 text = "Load" -[node name="Options" parent="MarginContainer/Hbox" unique_id=1664031607 instance=ExtResource("1_t6us6")] +[node name="Options" parent="Control/MarginContainer/Hbox" unique_id=1664031607 instance=ExtResource("1_t6us6")] layout_mode = 2 text = "Options" -[node name="Quit" parent="MarginContainer/Hbox" unique_id=443491275 instance=ExtResource("1_t6us6")] +[node name="Quit" parent="Control/MarginContainer/Hbox" unique_id=443491275 instance=ExtResource("1_t6us6")] layout_mode = 2 text = "Quit" -[connection signal="pressed" from="MarginContainer/Hbox/Start" to="." method="_on_start_pressed"] -[connection signal="pressed" from="MarginContainer/Hbox/Options" to="." method="_on_options_pressed"] -[connection signal="pressed" from="MarginContainer/Hbox/Quit" to="." method="_on_exit_pressed"] +[connection signal="pressed" from="Control/MarginContainer/Hbox/Start" to="." method="_on_start_pressed"] +[connection signal="pressed" from="Control/MarginContainer/Hbox/Options" to="." method="_on_options_pressed"] +[connection signal="pressed" from="Control/MarginContainer/Hbox/Quit" to="." method="_on_quit_pressed"] diff --git a/scenes/ui/title_button.gd b/scenes/ui/title_button.gd deleted file mode 100644 index 3dc86fb..0000000 --- a/scenes/ui/title_button.gd +++ /dev/null @@ -1,20 +0,0 @@ -extends Control - -var options: CanvasLayer - -func _on_exit_pressed() -> void: - get_tree().quit() - - -func _on_start_pressed() -> void: - get_tree().change_scene_to_file("res://scenes/room/start.tscn") - - -func _on_main_menu_pressed() -> void: - get_tree().change_scene_to_file("res://scenes/ui/title.tscn") - - -func _on_options_pressed() -> void: - options = load("uid://i8ml66ykc8eh").instantiate() - add_child(options) - diff --git a/scenes/ui/title_button.gd.uid b/scenes/ui/title_button.gd.uid deleted file mode 100644 index e1ce955..0000000 --- a/scenes/ui/title_button.gd.uid +++ /dev/null @@ -1 +0,0 @@ -uid://c5pqgx27uuybk |
