From 4f89893c29ac129a4dfd043aeea948ff7f1a007d Mon Sep 17 00:00:00 2001 From: Stefano Pigozzi Date: Fri, 19 Apr 2024 01:47:34 +0200 Subject: [PATCH] Remove some more references to `Draggable` --- entities/imp.tscn | 4 +++- entities/sheep.gd | 2 -- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/entities/imp.tscn b/entities/imp.tscn index dba8281..08e5ec3 100644 --- a/entities/imp.tscn +++ b/entities/imp.tscn @@ -43,7 +43,7 @@ wait_time = 0.8 autostart = true [node name="MovementSampler" parent="." node_paths=PackedStringArray("possibilities") instance=ExtResource("7_ech8d")] -possibilities = [null, null, null, null] +possibilities = [NodePath("../MovementWander/WanderPriority"), NodePath("../MovementHunt/HuntPriority")] [node name="MovementWander" parent="." instance=ExtResource("8_ffcw0")] speed = 25.0 @@ -80,10 +80,12 @@ tracker = NodePath("..") [connection signal="timeout" from="CoinSpawner/Timer" to="CoinSpawner" method="spawn"] [connection signal="ready" from="MovementSampler" to="MovementSampler" method="enable"] [connection signal="changed_direction" from="MovementWander" to="MovementWander/WanderPriority" method="priority_conditional"] +[connection signal="move" from="MovementWander" to="." method="_on_move"] [connection signal="move_disabled" from="MovementWander" to="MovementWander/ChangeDirectionTimer" method="stop"] [connection signal="move_enabled" from="MovementWander" to="MovementWander/ChangeDirectionTimer" method="start"] [connection signal="timeout" from="MovementWander/ChangeDirectionTimer" to="MovementWander" method="randomize_direction"] [connection signal="changed_target" from="MovementHunt" to="MovementHunt/HuntPriority" method="priority_conditional"] +[connection signal="move" from="MovementHunt" to="." method="_on_move"] [connection signal="tracked" from="MovementHunt/TrackerMeat" to="MovementHunt/TrackerMeat/TargetPicker" method="sample_target_if_null"] [connection signal="untracked" from="MovementHunt/TrackerMeat" to="MovementHunt/TrackerMeat/TargetPicker" method="clear_if_target"] [connection signal="target_changed" from="MovementHunt/TrackerMeat/TargetPicker" to="MovementHunt/TrackerMeat/TargetPicker" method="sample_target_if_null"] diff --git a/entities/sheep.gd b/entities/sheep.gd index 83b1170..8d3a888 100644 --- a/entities/sheep.gd +++ b/entities/sheep.gd @@ -3,8 +3,6 @@ class_name Sheep @onready var sprite: SpriteLeftRight = $"Sprite" -@onready var drag_sound: AudioStreamPlayer2D = $"Draggable/DragSound" -@onready var drop_sound: AudioStreamPlayer2D = $"Draggable/DropSound" @onready var animator: AnimationPlayer = $"Animator"