Made interaction area 2d work - and farming/growing work again.

This commit is contained in:
2025-05-14 23:12:14 +02:00
parent 366923699c
commit ff85b67087
15 changed files with 186 additions and 215 deletions
+9 -7
View File
@@ -3,22 +3,24 @@
[ext_resource type="Script" uid="uid://ckp413wrub5fm" path="res://scripts/CSharp/Common/CharacterControls/InteractionArea2D.cs" id="1_6svbd"]
[sub_resource type="CircleShape2D" id="CircleShape2D_npluf"]
radius = 100.0
radius = 300.0
[node name="InteractionArea" type="Node2D" node_paths=PackedStringArray("_area", "_label")]
script = ExtResource("1_6svbd")
_area = NodePath("Area3D")
_area = NodePath("Area2D")
_label = NodePath("Label")
[node name="Area3D" type="Area2D" parent="."]
collision_mask = 16
[node name="Area2D" type="Area2D" parent="."]
[node name="CollisionShape3D" type="CollisionShape2D" parent="Area3D"]
[node name="CollisionShape3D" type="CollisionShape2D" parent="Area2D"]
shape = SubResource("CircleShape2D_npluf")
[node name="Label" type="Label" parent="."]
visible = false
offset_right = 50.0
offset_bottom = 30.0
scale = Vector2(2, 2)
text = "[E]"
[connection signal="body_entered" from="Area3D" to="." method="OnPlayerEntered"]
[connection signal="body_exited" from="Area3D" to="." method="OnPlayerExited"]
[connection signal="body_entered" from="Area2D" to="." method="OnPlayerEntered"]
[connection signal="body_exited" from="Area2D" to="." method="OnPlayerExited"]