:memo::fire:🔨
- removed a lot of unnecessary code - Made a minimal working version - Added documentation
This commit is contained in:
@@ -2142,7 +2142,7 @@ editable = false
|
||||
scrollable = false
|
||||
|
||||
[node name="DetectionCross" parent="CharacterBody2D" instance=ExtResource("466_e04c3")]
|
||||
position = Vector2(0, -400)
|
||||
position = Vector2(0, -200)
|
||||
|
||||
[node name="FarmingControls" type="Node2D" parent="." node_paths=PackedStringArray("_movingPlayer", "_wateringParticles")]
|
||||
script = ExtResource("817_6nrw3")
|
||||
@@ -2193,10 +2193,7 @@ wait_time = 0.5
|
||||
[connection signal="InventorySelectionChanged" from="." to="CharacterBody2D/WateringCanUI" method="IsWateringCanActive"]
|
||||
[connection signal="PickedUpTool" from="." to="CharacterBody2D/visuals" method="ActivateTool"]
|
||||
[connection signal="PickedUpTool" from="." to="CharacterBody2D/WateringCanUI" method="IsWateringCanActive"]
|
||||
[connection signal="LookingDown" from="CharacterBody2D/visuals" to="CharacterBody2D/DetectionCross" method="ActivateDown"]
|
||||
[connection signal="LookingLeft" from="CharacterBody2D/visuals" to="CharacterBody2D/DetectionCross" method="ActivateLeft"]
|
||||
[connection signal="LookingRight" from="CharacterBody2D/visuals" to="CharacterBody2D/DetectionCross" method="ActivateRight"]
|
||||
[connection signal="LookingUp" from="CharacterBody2D/visuals" to="CharacterBody2D/DetectionCross" method="ActivateUp"]
|
||||
[connection signal="LookDirection" from="CharacterBody2D/visuals" to="CharacterBody2D/DetectionCross" method="SetDirection"]
|
||||
[connection signal="WateringField" from="FarmingControls" to="CharacterBody2D/visuals" method="PlayWateringAnimation"]
|
||||
[connection signal="WateringField" from="FarmingControls" to="CharacterBody2D/WateringCanUI" method="Water"]
|
||||
[connection signal="timelineEnded" from="dialogic toggle" to="." method="EnableMovement"]
|
||||
|
||||
@@ -3,21 +3,10 @@
|
||||
[ext_resource type="Script" uid="uid://ccc6m6c5khd2x" path="res://scripts/CSharp/Common/CharacterControls/DetectionCross.cs" id="1_va8tx"]
|
||||
[ext_resource type="PackedScene" uid="uid://dugr6ff1g7hi0" path="res://prefabs/interactions/detector.tscn" id="2_8hh05"]
|
||||
|
||||
[node name="DetectionCross" type="Node2D" node_paths=PackedStringArray("_left", "_right", "_up", "_down")]
|
||||
[node name="DetectionCross" type="Node2D" node_paths=PackedStringArray("_detector")]
|
||||
script = ExtResource("1_va8tx")
|
||||
_left = NodePath("detector_left")
|
||||
_right = NodePath("detector_right")
|
||||
_up = NodePath("detector_top")
|
||||
_down = NodePath("detector_bottom")
|
||||
_detector = NodePath("detector")
|
||||
_xOffset = 300.0
|
||||
_yOffset = 300.0
|
||||
|
||||
[node name="detector_right" parent="." instance=ExtResource("2_8hh05")]
|
||||
position = Vector2(300, 250)
|
||||
|
||||
[node name="detector_left" parent="." instance=ExtResource("2_8hh05")]
|
||||
position = Vector2(-300, 250)
|
||||
|
||||
[node name="detector_top" parent="." instance=ExtResource("2_8hh05")]
|
||||
position = Vector2(0, -200)
|
||||
|
||||
[node name="detector_bottom" parent="." instance=ExtResource("2_8hh05")]
|
||||
position = Vector2(0, 700)
|
||||
[node name="detector" parent="." instance=ExtResource("2_8hh05")]
|
||||
|
||||
@@ -3,15 +3,12 @@
|
||||
[ext_resource type="Script" uid="uid://c3pd60biootsx" path="res://scripts/CSharp/Common/CharacterControls/Detector.cs" id="1_6pib0"]
|
||||
|
||||
[sub_resource type="RectangleShape2D" id="RectangleShape2D_qwv4c"]
|
||||
size = Vector2(300, 300)
|
||||
size = Vector2(100, 200)
|
||||
|
||||
[node name="right" type="Area2D"]
|
||||
[node name="detector" type="Area2D"]
|
||||
collision_layer = 4
|
||||
script = ExtResource("1_6pib0")
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
|
||||
shape = SubResource("RectangleShape2D_qwv4c")
|
||||
debug_color = Color(0.9459047, 7.2196126e-06, 0.5925879, 0.41960785)
|
||||
|
||||
[connection signal="InteractableEntered" from="." to="CollisionShape2D" method="hide"]
|
||||
[connection signal="InteractableExited" from="." to="CollisionShape2D" method="show"]
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
|
||||
[sub_resource type="CircleShape2D" id="CircleShape2D_npluf"]
|
||||
resource_local_to_scene = true
|
||||
radius = 300.0
|
||||
radius = 150.0
|
||||
|
||||
[sub_resource type="Theme" id="Theme_5ajrf"]
|
||||
default_font_size = 30
|
||||
@@ -17,10 +17,9 @@ _area = NodePath("Area2D")
|
||||
_label = NodePath("Area2D/CanvasLayer/MarginContainer/Label")
|
||||
_outlineMaterial = ExtResource("2_qoey7")
|
||||
|
||||
[node name="Area2D" type="Area2D" parent="." node_paths=PackedStringArray("_interactionArea2D")]
|
||||
[node name="Area2D" type="Area2D" parent="."]
|
||||
collision_mask = 4
|
||||
script = ExtResource("3_2wrrq")
|
||||
_interactionArea2D = NodePath("..")
|
||||
|
||||
[node name="CollisionShape3D" type="CollisionShape2D" parent="Area2D"]
|
||||
shape = SubResource("CircleShape2D_npluf")
|
||||
|
||||
Reference in New Issue
Block a user