From eb5dae5b3b87bec8486ad210221e67acab101c2d Mon Sep 17 00:00:00 2001 From: Antonio Dell'Annunziata Date: Sat, 29 Mar 2025 10:54:45 +0100 Subject: [PATCH] Make dark cut mandatory for unlocking other map points --- bob.tscn | 28 +++++++++++++++++++++ main.gd | 21 ++++++++++------ main.tscn | 29 +-------------------- map/prototype_map.gd | 14 +++++------ operation/operation.gd | 8 ++++++ operation/prototype_dark_cut.gd | 2 -- operation/prototype_dark_cut.tscn | 22 +++++++++++++--- operation/ritual_step.gd | 11 ++++++++ operation/ritual_step.gd.uid | 1 + ritual/incantation_text.gd | 5 ++++ ritual/prototype_ritual_book.tscn | 42 +++++++++++-------------------- 11 files changed, 109 insertions(+), 74 deletions(-) create mode 100644 bob.tscn create mode 100644 operation/ritual_step.gd create mode 100644 operation/ritual_step.gd.uid diff --git a/bob.tscn b/bob.tscn new file mode 100644 index 0000000..5af07e2 --- /dev/null +++ b/bob.tscn @@ -0,0 +1,28 @@ +[gd_scene load_steps=4 format=3 uid="uid://c2cgr4eqpyahm"] + +[ext_resource type="PackedScene" uid="uid://3oqyqft8w72m" path="res://selectable.tscn" id="1_uk0nh"] + +[sub_resource type="Gradient" id="Gradient_fq5io"] +offsets = PackedFloat32Array(0.272085) +colors = PackedColorArray(0.202521, 0.371426, 0.429081, 1) + +[sub_resource type="GradientTexture2D" id="GradientTexture2D_ty4ro"] +gradient = SubResource("Gradient_fq5io") +width = 100 +height = 200 +fill_from = Vector2(0.5, 0) +fill_to = Vector2(0.5, 1) + +[node name="Bob" type="Sprite2D"] +texture = SubResource("GradientTexture2D_ty4ro") + +[node name="Selectable" parent="." instance=ExtResource("1_uk0nh")] + +[node name="CollisionPolygon2D" type="CollisionPolygon2D" parent="Selectable"] +polygon = PackedVector2Array(-50, 100, -50, -100, 50, -100, 50, 100) + +[node name="Label" type="Label" parent="."] +offset_top = 2.0 +offset_right = 40.0 +offset_bottom = 25.0 +text = "Bob" diff --git a/main.gd b/main.gd index f983e9e..134c0b6 100644 --- a/main.gd +++ b/main.gd @@ -10,9 +10,11 @@ const MAP_SCENE = preload("res://map/prototype_map.tscn") var shown_map_points: Array[int] = [0] var is_dialog_shown = false - -func _ready(): - _on_bob_clicked() +var map_precondition: String: + set(new_value): + if map_precondition == "dark_cut_completed" and not new_value: + (get_node("PrototypeMap") as PrototypeMap).show_map_point([1]) + map_precondition = new_value func _on_bob_clicked(): var dialog_bob = DIALOG_BOB_SCENE.instantiate() @@ -37,14 +39,13 @@ func _show_dark_cut(): move_child.call_deferred($Suitcase, -1) func _on_map_selectable_clicked(): - _disable_node2d(room) var map: PrototypeMap = MAP_SCENE.instantiate() map.shown_points = shown_map_points - map.dialog_triggered.connect(_on_map_dialog_triggered) + map.dialog_triggered.connect(_on_map_dialog_triggered.bind(map)) map.shown_points_changed.connect(func(value): shown_map_points = value) map.map_closed.connect(_on_map_closed.bind(map)) add_child.call_deferred(map) - + func _disable_node2d(node: Node2D): node.hide() node.set_deferred("process", false) @@ -70,6 +71,7 @@ func _show_dialog(dialog): func _on_dark_cut_succeeded(dark_cut: DarkCut): dark_cut.queue_free() + map_precondition = "" _show_room() func _on_dark_cut_failed(dark_cut: DarkCut): @@ -88,8 +90,13 @@ func _on_dialog_finished(choice_selected: String, dialog: Node): if choice_selected == "Approach body": _show_dark_cut() -func _on_map_dialog_triggered(dialog_map: DialogMap): +func _on_map_dialog_triggered(dialog_map: DialogMap, map_points_to_show: Array[int], precondition: String, map: PrototypeMap): _show_dialog(dialog_map) + if not precondition: + map.show_map_point(map_points_to_show) + else: + map_precondition = precondition + func _on_map_closed(map: PrototypeMap): map.queue_free() diff --git a/main.tscn b/main.tscn index 0dc3034..ac3dff9 100644 --- a/main.tscn +++ b/main.tscn @@ -1,4 +1,4 @@ -[gd_scene load_steps=34 format=3 uid="uid://w3ntt1yh1nq7"] +[gd_scene load_steps=32 format=3 uid="uid://w3ntt1yh1nq7"] [ext_resource type="Script" uid="uid://lnmooufxbuym" path="res://main.gd" id="1_dp5o4"] [ext_resource type="PackedScene" uid="uid://3oqyqft8w72m" path="res://selectable.tscn" id="3_g5hfc"] @@ -28,17 +28,6 @@ colors = PackedColorArray(0.281175, 0.300745, 0.258554, 1) gradient = SubResource("Gradient_wb6aq") width = 1152 -[sub_resource type="Gradient" id="Gradient_fq5io"] -offsets = PackedFloat32Array(0.272085) -colors = PackedColorArray(0.202521, 0.371426, 0.429081, 1) - -[sub_resource type="GradientTexture2D" id="GradientTexture2D_ty4ro"] -gradient = SubResource("Gradient_fq5io") -width = 100 -height = 200 -fill_from = Vector2(0.5, 0) -fill_to = Vector2(0.5, 1) - [sub_resource type="Gradient" id="Gradient_ncwe7"] offsets = PackedFloat32Array(0.282686) colors = PackedColorArray(0.368627, 0, 0, 1) @@ -171,21 +160,6 @@ position = Vector2(578, -71) scale = Vector2(1.001, 652) texture = SubResource("GradientTexture1D_ij864") -[node name="Bob" type="Sprite2D" parent="Room"] -position = Vector2(242, 258) -texture = SubResource("GradientTexture2D_ty4ro") - -[node name="Selectable" parent="Room/Bob" instance=ExtResource("3_g5hfc")] - -[node name="CollisionPolygon2D" type="CollisionPolygon2D" parent="Room/Bob/Selectable"] -polygon = PackedVector2Array(-50, 100, -50, -100, 50, -100, 50, 100) - -[node name="Label" type="Label" parent="Room/Bob"] -offset_top = 2.0 -offset_right = 40.0 -offset_bottom = 25.0 -text = "Bob" - [node name="RitualPlace" type="Sprite2D" parent="Room"] position = Vector2(469, 390) texture = SubResource("GradientTexture2D_ftstk") @@ -322,7 +296,6 @@ text = "Map" [node name="Suitcase" parent="." instance=ExtResource("12_dg77c")] position = Vector2(177, 487) -[connection signal="clicked" from="Room/Bob/Selectable" to="." method="_on_bob_clicked"] [connection signal="input_event" from="Room/Shelves/Pliers/GrabArea" to="Room/Shelves/Pliers" method="_on_grab_area_input_event"] [connection signal="area_entered" from="Room/Shelves/Scalpel/CutArea" to="Room/Shelves/Scalpel" method="_on_cut_area_area_entered"] [connection signal="area_exited" from="Room/Shelves/Scalpel/CutArea" to="Room/Shelves/Scalpel" method="_on_cut_area_area_exited"] diff --git a/map/prototype_map.gd b/map/prototype_map.gd index 076a730..0fa70a6 100644 --- a/map/prototype_map.gd +++ b/map/prototype_map.gd @@ -1,7 +1,7 @@ class_name PrototypeMap extends Node2D -signal dialog_triggered(dialog_map: DialogMap) +signal dialog_triggered(dialog_map: DialogMap, map_points_to_show: Array[int], precondition: String) signal shown_points_changed(new_shown_points: Array[int]) signal map_closed @@ -11,6 +11,7 @@ var shown_points: Array[int]: set(new_value): shown_points = new_value shown_points_changed.emit(shown_points) +var next_points_to_unlock: Array[int] = [] func _ready(): for point in shown_points: @@ -19,7 +20,7 @@ func _ready(): func _on_map_point_clicked(): if not $MapPoint2.is_shown_on_map: - _trigger_dialog(0, [1]) + _trigger_dialog(0, [1], "dark_cut_completed") func _on_map_point_2_clicked(): if not $MapPoint3.is_shown_on_map: @@ -31,14 +32,13 @@ func _on_map_point_3_clicked(): func _on_map_point_4_clicked(): _trigger_dialog(3) -func _trigger_dialog(map_point_number: int, map_points_to_show: Array[int] = []): +func _trigger_dialog(map_point_number: int, map_points_to_show: Array[int] = [], precondition: String = ""): var dialog_map: DialogMap = DIALOG_MAP.instantiate() dialog_map.map_point_number = map_point_number - dialog_map.dialog_finished.connect(_show_map_point.bind(map_point_number, map_points_to_show)) - dialog_triggered.emit(dialog_map) + dialog_triggered.emit(dialog_map, map_points_to_show, precondition) -func _show_map_point(choice_selected: String, map_point_number: int, map_points_to_show: Array[int]): - if choice_selected == "Go back" or map_points_to_show.is_empty(): return +func show_map_point(map_points_to_show: Array[int]): + if map_points_to_show.is_empty(): return for point in map_points_to_show: _get_map_point(point).is_shown_on_map = true diff --git a/operation/operation.gd b/operation/operation.gd index 1e04b13..3a23a73 100644 --- a/operation/operation.gd +++ b/operation/operation.gd @@ -22,6 +22,9 @@ func _ready(): elif child is GrabStep: child.step_succeeded.connect(_on_grab_step_succeeded.bind(child)) _disable_node2d(child) + elif child is RitualStep: + child.step_succeeded.connect(_on_ritual_step_succeeded.bind(child)) + _disable_node2d(child) active_step = steps[0] if active_step is GrabStep: @@ -45,6 +48,11 @@ func _on_cut_sequence_failed(cut_sequence: CutSequence): pass func _on_grab_step_succeeded(grab_step: GrabStep): + var next_index = steps.find(grab_step) + 1 + active_step = steps[next_index] + _enable_node2d(active_step) + +func _on_ritual_step_succeeded(ritual_step: RitualStep): succeeded.emit() diff --git a/operation/prototype_dark_cut.gd b/operation/prototype_dark_cut.gd index 6dc7751..474c312 100644 --- a/operation/prototype_dark_cut.gd +++ b/operation/prototype_dark_cut.gd @@ -9,10 +9,8 @@ func _on_patience_bar_value_changed(value): if value <= 0: failed.emit() - func _on_operation_succeeded(): succeeded.emit() - func _on_abort_button_pressed(): failed.emit() diff --git a/operation/prototype_dark_cut.tscn b/operation/prototype_dark_cut.tscn index 53b6d39..ebb6a71 100644 --- a/operation/prototype_dark_cut.tscn +++ b/operation/prototype_dark_cut.tscn @@ -1,4 +1,4 @@ -[gd_scene load_steps=18 format=3 uid="uid://be0rqt7sk1da0"] +[gd_scene load_steps=20 format=3 uid="uid://be0rqt7sk1da0"] [ext_resource type="Texture2D" uid="uid://bicjfwpoa3pma" path="res://operation/test_table.png" id="1_7i8d4"] [ext_resource type="Script" uid="uid://bge4rddktehkh" path="res://operation/prototype_dark_cut.gd" id="1_vl0qk"] @@ -12,6 +12,8 @@ [ext_resource type="Script" uid="uid://bcmj8d22a0kg" path="res://operation/cut_sequence.gd" id="10_gcaa6"] [ext_resource type="PackedScene" uid="uid://x5powiwrfash" path="res://operation/cut_sequence_point.tscn" id="11_hcsao"] [ext_resource type="Script" uid="uid://cvts663aoxl7g" path="res://operation/bat_extraction_bat.gd" id="13_um5dt"] +[ext_resource type="Script" uid="uid://cgom2jfkjmwv8" path="res://operation/ritual_step.gd" id="14_uv6f2"] +[ext_resource type="PackedScene" uid="uid://qkwh186nbcya" path="res://ritual/prototype_ritual_book.tscn" id="15_37tl7"] [ext_resource type="Script" uid="uid://diku6p1um3ko6" path="res://operation/grab_step.gd" id="18_d00rj"] [sub_resource type="StyleBoxFlat" id="StyleBoxFlat_pgu75"] @@ -81,12 +83,12 @@ scale = Vector2(1.001, 648) texture = SubResource("GradientTexture1D_f6e8o") [node name="TestTable" type="Sprite2D" parent="."] -position = Vector2(613, 358) +position = Vector2(840, 356) texture = ExtResource("1_7i8d4") [node name="TestBody1" type="Sprite2D" parent="."] unique_name_in_owner = true -position = Vector2(620, 399) +position = Vector2(847, 397) texture = ExtResource("2_atjyl") [node name="Area2D" type="Area2D" parent="TestBody1"] @@ -97,10 +99,12 @@ collision_mask = 4 polygon = PackedVector2Array(0, -250, -39.2, -250, -45.6, -246, -48.9, -246, -54.9, -239, -56.2, -239, -61.1, -230, -62.6, -230, -67.5, -210, -69, -210, -69, -181.7, -65, -168, -65, -163.3, -49, -143, -47, -128.8, -47, -124.8, -63.3, -122, -67.3, -122, -102.9, -109.8, -113.5, -116, -124.4, -116, -148.3, -106, -150, -106, -150, 49.2, -146, 67.4, -146, 71.4, -138, 93.4, -138, 99.7, -132, 106.7, -132, 109, -115.2, 109, -108.2, 102, -106.5, 102, -101.5, 86, -100, 86, -99, 35, -99, 16.8, -96.5, 26, -96, 93, -100, 140.9, -100, 163.1, -95.7, 192, -94.9, 192, -91, 246.1, -91, 250, 61, 250, 61, 236.5, 58, 230.5, 58, 217.1, 68, 38.1, 68, 64.3, 74, 82.3, 74, 85, 82, 91, 82, 92.8, 93, 93.8, 93, 95, 109.8, 95, 117.7, 88, 119.8, 88, 128.8, 9, 129.9, 9, 131.9, -42, 133.1, -42, 132, -84, 132, -90.7, 121, -103.8, 121, -105.6, 113, -107.6, 113, -109.2, 90.1, -107.1, 87, -112.5, 87, -114.9, 75, -125, 75, -127.2, 44.8, -124, 31.2, -124, 33, -144.9, 33, -151.3, 48.9, -169, 50.4, -169, 54.4, -179, 56, -179, 56, -200.6, 43, -219.7, 43, -222, 30, -232, 30, -233.2, 0, -248.3) [node name="Operation" type="Node2D" parent="."] +position = Vector2(227, -2) script = ExtResource("7_mteqj") [node name="CutSequence" type="Node2D" parent="Operation"] script = ExtResource("10_gcaa6") +is_skipped = true [node name="CutSequencePoint" parent="Operation/CutSequence" instance=ExtResource("11_hcsao")] position = Vector2(558, 316) @@ -120,6 +124,7 @@ position = Vector2(668, 311) [node name="CutSequence2" type="Node2D" parent="Operation"] position = Vector2(-4, 69) script = ExtResource("10_gcaa6") +is_skipped = true [node name="CutSequencePoint" parent="Operation/CutSequence2" instance=ExtResource("11_hcsao")] position = Vector2(618, 257) @@ -136,6 +141,7 @@ position = Vector2(615, 334) [node name="CutSequence3" type="Node2D" parent="Operation"] position = Vector2(-4, 69) script = ExtResource("10_gcaa6") +is_skipped = true [node name="CutSequencePoint" parent="Operation/CutSequence3" instance=ExtResource("11_hcsao")] position = Vector2(615, 334) @@ -152,6 +158,7 @@ position = Vector2(562, 355) [node name="CutSequence4" type="Node2D" parent="Operation"] position = Vector2(-4, 69) script = ExtResource("10_gcaa6") +is_skipped = true [node name="CutSequencePoint" parent="Operation/CutSequence4" instance=ExtResource("11_hcsao")] position = Vector2(615, 334) @@ -169,6 +176,7 @@ position = Vector2(665, 355) unique_name_in_owner = true position = Vector2(620, 399) script = ExtResource("18_d00rj") +is_skipped = true grabbing_target_path = NodePath("Path2D/PathFollow2D/BatExtractionBat") [node name="BatExtractionOpenChest" type="Sprite2D" parent="Operation/BatGrabStep"] @@ -249,6 +257,14 @@ priority = 4 [node name="CollisionPolygon2D" type="CollisionPolygon2D" parent="Operation/BatGrabStep/BatExtractionBones/BonesHurtArea"] polygon = PackedVector2Array(39, -86, 39, -84.3, 21, -75.2, -2, -75, -2, -74, -14.8, -74, -16, -76.5, -16, -79.8, -32.4, -74, -34.6, -74, -62.7, -84, -64.8, -84, -68, -80.8, -68, -78.2, -61, -71.2, -61, -69.3, -38, -65.3, -38, -63.6, -19, -67, -19, -59.5, -41, -53.5, -50.9, -54, -55.4, -54, -63.4, -59, -68.1, -59, -71.1, -54, -74.2, -54, -72, -49.6, -72, -45.8, -68, -43.8, -68, -42, -54, -42, -54, -40.9, -37.9, -42, -29.4, -42, -20, -48.7, -17.1, -44, -16, -24.9, -16, -16.2, 20, 21.8, 20, 23.2, 22.1, 24.3, 25.1, 22.3, 27.9, 27, 36.6, 27, 45, 21, 45, 16.9, 22.6, 2, 19.8, 2, 14.3, -3.5, 21, -6.8, 21, -13.1, 5.60001, -22.8, 15, -18.8, 15, -17, 23, -17, 23, -15.9, 40.1, -17, 45.5, -17, 48, -25.7, 48, -28.8, 37.1, -30, 25.3, -30, 4, -39.3, 4, -43.5, 21.8, -39, 42.4, -39, 46, -49.7, 46, -52.8, 42.8, -56, 40.2, -56, 37.2, -53, 22.1, -53, 3, -58.5, 3, -59.5, 5.7, -65.1, 30.1, -66, 36.8, -66, 49.8, -79, 51.3, -79, 52.4, -81.5, 50, -83.9, 50, -86) +[node name="RitualStep" type="Node2D" parent="Operation"] +position = Vector2(-366, -5) +script = ExtResource("14_uv6f2") + +[node name="PrototypeRitualBook" parent="Operation/RitualStep" instance=ExtResource("15_37tl7")] +position = Vector2(179, 150) + [connection signal="value_changed" from="DarkCutUI/HBoxContainer/PatienceBar" to="." method="_on_patience_bar_value_changed"] [connection signal="pressed" from="DarkCutUI/AbortButton" to="." method="_on_abort_button_pressed"] [connection signal="succeeded" from="Operation" to="." method="_on_operation_succeeded"] +[connection signal="incantation_completed" from="Operation/RitualStep/PrototypeRitualBook" to="Operation/RitualStep" method="_on_ritual_book_incantation_completed"] diff --git a/operation/ritual_step.gd b/operation/ritual_step.gd new file mode 100644 index 0000000..de98bd5 --- /dev/null +++ b/operation/ritual_step.gd @@ -0,0 +1,11 @@ +class_name RitualStep +extends Node2D + +signal step_succeeded + + +@export var is_skipped: bool = false + + +func _on_ritual_book_incantation_completed(): + step_succeeded.emit() diff --git a/operation/ritual_step.gd.uid b/operation/ritual_step.gd.uid new file mode 100644 index 0000000..6b73ee6 --- /dev/null +++ b/operation/ritual_step.gd.uid @@ -0,0 +1 @@ +uid://cgom2jfkjmwv8 diff --git a/ritual/incantation_text.gd b/ritual/incantation_text.gd index bf9ac1d..1ebadfc 100644 --- a/ritual/incantation_text.gd +++ b/ritual/incantation_text.gd @@ -25,3 +25,8 @@ func _draw(): draw_set_transform(t.origin - (Vector2.UP * 5).rotated(t.get_rotation()), t.get_rotation()) draw_char(get_theme_default_font(), Vector2.ZERO, c, 16, Color.WHITE if offset >= colored_offset else Color.RED) offset += 10 + + +func _on_visibility_changed(): + print("Test") + queue_redraw() diff --git a/ritual/prototype_ritual_book.tscn b/ritual/prototype_ritual_book.tscn index 56ba817..9893123 100644 --- a/ritual/prototype_ritual_book.tscn +++ b/ritual/prototype_ritual_book.tscn @@ -1,9 +1,8 @@ -[gd_scene load_steps=9 format=3 uid="uid://qkwh186nbcya"] +[gd_scene load_steps=8 format=3 uid="uid://qkwh186nbcya"] [ext_resource type="Script" uid="uid://dak6uc4v3us7w" path="res://ritual/incantation.gd" id="1_v6csu"] [ext_resource type="Script" uid="uid://dsiaa53vt3y6e" path="res://ritual/prototype_ritual_book.gd" id="1_yc2mw"] [ext_resource type="Script" uid="uid://cpscp5a5nxfop" path="res://ritual/incantation_text.gd" id="2_5ntyk"] -[ext_resource type="Script" uid="uid://cpyqpaggaiqb4" path="res://block_input_area.gd" id="2_m7f1b"] [sub_resource type="Gradient" id="Gradient_2cqfq"] offsets = PackedFloat32Array(0.80212, 0.978799, 1) @@ -16,9 +15,9 @@ height = 400 [sub_resource type="Curve2D" id="Curve2D_5ntyk"] _data = { -"points": PackedVector2Array(0, 0, 0, 0, 202, 149, -40.482, 1.54217, 40.482, -1.54217, 248, 178, -17.3494, 5.01206, 17.3494, -5.01206, 309, 150, -10.7952, -15.0362, 10.7952, 15.0362, 380, 180, 0, 0, 0, 0, 380, 180, 32.7712, -32.7712, -32.7712, 32.7712, 379, 257, 30.385, 3.70613, -30.385, -3.70613, 305, 219, 0, 0, -49.7351, 23.1326, 255, 252, 27.3736, -12.3374, -27.3736, 12.3374, 198, 230, -28.5302, -24.6748, 28.5302, 24.6748, 202, 319, 0, 0, 0, 0, 377, 318) +"points": PackedVector2Array(-21.0368, -45.0789, 21.0368, 45.0789, 28, 28, 0, 0, 0, 0, 84, 57, -30.0526, 3.00526, 30.0526, -3.00526, 127, 41, -37.5657, -19.5342, 37.5657, 19.5342, 213, 45, 11.2697, -20.2855, -11.2697, 20.2855, 240, 98, 42.8249, -12.7724, -42.8249, 12.7724, 172, 150, 27.7986, -26.296, -27.7986, 26.296, 40, 160, -15.7776, -22.5394, 15.7776, 22.5394, 42, 220, -27.0473, -14.275, 27.0473, 14.275, 113, 280, 0, 0, 0, 0, 230, 288) } -point_count = 11 +point_count = 10 [sub_resource type="CircleShape2D" id="CircleShape2D_v6csu"] radius = 13.8924 @@ -27,40 +26,27 @@ radius = 13.8924 script = ExtResource("1_yc2mw") [node name="Left" type="Sprite2D" parent="."] -position = Vector2(306, 311) +position = Vector2(151, 201) texture = SubResource("GradientTexture2D_yaehf") [node name="Right" type="Sprite2D" parent="."] -position = Vector2(606, 311) +position = Vector2(451, 201) rotation = 3.14159 texture = SubResource("GradientTexture2D_yaehf") [node name="CloseButton" type="Button" parent="."] -offset_left = 698.0 -offset_top = 117.0 -offset_right = 748.0 -offset_bottom = 148.0 +offset_left = 543.0 +offset_top = 7.0 +offset_right = 593.0 +offset_bottom = 38.0 text = "Close" -[node name="BlockInputArea" type="Area2D" parent="."] -script = ExtResource("2_m7f1b") - -[node name="CollisionPolygon2D" type="CollisionPolygon2D" parent="BlockInputArea"] -position = Vector2(306, 311) -polygon = PackedVector2Array(-150, -200, -150, 200, 150, 200, 150, -200) - -[node name="CollisionPolygon2D2" type="CollisionPolygon2D" parent="BlockInputArea"] -position = Vector2(606, 311) -rotation = 3.14159 -polygon = PackedVector2Array(-150, -200, -150, 200, 150, 200, 150, -200) - [node name="Incantation" type="Path2D" parent="."] -position = Vector2(-1, 1) curve = SubResource("Curve2D_5ntyk") script = ExtResource("1_v6csu") [node name="Area2D" type="Area2D" parent="Incantation"] -position = Vector2(202, 149) +position = Vector2(29, 28) rotation = 0.562498 collision_layer = 512 collision_mask = 512 @@ -71,10 +57,12 @@ shape = SubResource("CircleShape2D_v6csu") [node name="IncantationText" type="Control" parent="Incantation"] layout_mode = 3 anchors_preset = 0 -offset_right = 40.0 -offset_bottom = 23.0 +size_flags_horizontal = 3 +size_flags_vertical = 3 script = ExtResource("2_5ntyk") -text = "Hallo dies ist ein langer TExt, er könnte auch eine Ritual sein. Wir werden sehen" +text = "Hallo dies ist ein langer TExt, er könnte auch eine Ritual sein. Wir werden xxx" +metadata/_edit_use_anchors_ = true [connection signal="pressed" from="CloseButton" to="." method="_on_button_pressed"] [connection signal="completed" from="Incantation" to="." method="_on_incantation_completed"] +[connection signal="visibility_changed" from="Incantation/IncantationText" to="Incantation/IncantationText" method="_on_visibility_changed"]