[gd_scene load_steps=21 format=3 uid="uid://bc2bm8lbol18w"] [ext_resource type="Script" path="res://entities/sheep.gd" id="1_4dmll"] [ext_resource type="Texture2D" uid="uid://iljp5yn3ehfk" path="res://entities/sheep_left.png" id="2_t13f5"] [ext_resource type="PackedScene" uid="uid://bxbjfev0lhwws" path="res://behaviours/sprite_left_right.tscn" id="2_xbkrm"] [ext_resource type="PackedScene" uid="uid://dijcjahkddudv" path="res://behaviours/draggable.tscn" id="3_8ku7r"] [ext_resource type="Texture2D" uid="uid://cxtmas4g0v6en" path="res://entities/sheep_right.png" id="4_5qoof"] [ext_resource type="AudioStream" uid="uid://buxgivpkh8dyl" path="res://entities/drop.wav" id="4_nxjnl"] [ext_resource type="AudioStream" uid="uid://bmfscpnugaejk" path="res://entities/sheep_drag.wav" id="4_oalqu"] [ext_resource type="PackedScene" uid="uid://dfdr3e32lohq" path="res://behaviours/edible.tscn" id="6_3odsh"] [ext_resource type="PackedScene" uid="uid://djcwis8ycrq85" path="res://behaviours/sampler_priority.tscn" id="9_s5lod"] [ext_resource type="PackedScene" uid="uid://dk1ipq7dhkhf3" path="res://behaviours/move_straight.tscn" id="10_05kcd"] [ext_resource type="PackedScene" uid="uid://cm67ko1k6kn4u" path="res://behaviours/priority.tscn" id="11_0jlmk"] [ext_resource type="PackedScene" uid="uid://cml7rqvyfuagx" path="res://behaviours/move_towards.tscn" id="12_x2g3x"] [ext_resource type="PackedScene" uid="uid://cbg5kgwxusvxf" path="res://behaviours/cursor_detector.tscn" id="13_5fkdr"] [ext_resource type="PackedScene" uid="uid://c5pyp5hvthdof" path="res://behaviours/tracker_tracker.tscn" id="14_eqowb"] [sub_resource type="CircleShape2D" id="CircleShape2D_c5tcn"] radius = 8.0 [sub_resource type="Animation" id="Animation_gokbg"] length = 0.001 tracks/0/type = "value" tracks/0/imported = false tracks/0/enabled = true tracks/0/path = NodePath("Sprite:rotation") tracks/0/interp = 1 tracks/0/loop_wrap = true tracks/0/keys = { "times": PackedFloat32Array(0), "transitions": PackedFloat32Array(1), "update": 0, "values": [0.0] } [sub_resource type="Animation" id="Animation_s7ekl"] resource_name = "shake" length = 0.5 loop_mode = 1 step = 0.05 tracks/0/type = "value" tracks/0/imported = false tracks/0/enabled = true tracks/0/path = NodePath("Sprite:position") tracks/0/interp = 1 tracks/0/loop_wrap = true tracks/0/keys = { "times": PackedFloat32Array(0, 0.05, 0.1, 0.15, 0.2, 0.25, 0.3, 0.35, 0.4, 0.45, 0.5), "transitions": PackedFloat32Array(1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1), "update": 1, "values": [Vector2(0, 0), Vector2(1, 1), Vector2(-1, -1), Vector2(-1, 0), Vector2(1, -1), Vector2(-1, 1), Vector2(1, 1), Vector2(1, 0), Vector2(-1, -1), Vector2(1, 0), Vector2(0, -1)] } [sub_resource type="Animation" id="Animation_lxieb"] resource_name = "wobble" length = 3.0 loop_mode = 1 step = 0.5 tracks/0/type = "value" tracks/0/imported = false tracks/0/enabled = true tracks/0/path = NodePath("Sprite:rotation") tracks/0/interp = 2 tracks/0/loop_wrap = true tracks/0/keys = { "times": PackedFloat32Array(0, 0.5, 1.5, 2, 3), "transitions": PackedFloat32Array(1, 1, 1, 1, 1), "update": 0, "values": [0.0, -0.261799, 0.0, 0.261799, 0.0] } [sub_resource type="AnimationLibrary" id="AnimationLibrary_6mutq"] _data = { "RESET": SubResource("Animation_gokbg"), "shake": SubResource("Animation_s7ekl"), "wobble": SubResource("Animation_lxieb") } [sub_resource type="CircleShape2D" id="CircleShape2D_etpf6"] radius = 144.0 [node name="Sheep" type="CharacterBody2D"] collision_layer = 8 collision_mask = 14 script = ExtResource("1_4dmll") [node name="Sprite" parent="." instance=ExtResource("2_xbkrm")] position = Vector2(1, 1) scale = Vector2(2, 2) texture = ExtResource("2_t13f5") left_texture = ExtResource("2_t13f5") right_texture = ExtResource("4_5qoof") [node name="Shape" type="CollisionShape2D" parent="."] scale = Vector2(3, 3) shape = SubResource("CircleShape2D_c5tcn") [node name="Draggable" parent="." instance=ExtResource("3_8ku7r")] scale = Vector2(3, 3) [node name="DragSound" type="AudioStreamPlayer2D" parent="Draggable"] scale = Vector2(0.5, 0.5) stream = ExtResource("4_oalqu") [node name="DropSound" type="AudioStreamPlayer2D" parent="Draggable"] scale = Vector2(0.5, 0.5) stream = ExtResource("4_nxjnl") [node name="Animator" type="AnimationPlayer" parent="."] libraries = { "": SubResource("AnimationLibrary_6mutq") } [node name="Edible" parent="." instance=ExtResource("6_3odsh")] [node name="Movement" parent="." node_paths=PackedStringArray("possibilities") instance=ExtResource("9_s5lod")] possibilities = [NodePath("Idle/IdlePriority"), NodePath("Wander/WanderPriority"), NodePath("RunFromMouse/RunFromMousePriority"), NodePath("RunFromHunter/RunFromHunterPriority")] [node name="Idle" parent="Movement" instance=ExtResource("10_05kcd")] enabled = false [node name="IdlePriority" parent="Movement/Idle" instance=ExtResource("11_0jlmk")] priority = 10 [node name="BoredTimer" type="Timer" parent="Movement/Idle"] one_shot = true autostart = true [node name="Wander" parent="Movement" instance=ExtResource("10_05kcd")] enabled = false [node name="WanderPriority" parent="Movement/Wander" instance=ExtResource("11_0jlmk")] [node name="TiredTimer" type="Timer" parent="Movement/Wander"] one_shot = true [node name="RunFromMouse" parent="Movement" instance=ExtResource("12_x2g3x")] enabled = false [node name="RunFromMousePriority" parent="Movement/RunFromMouse" instance=ExtResource("11_0jlmk")] [node name="CursorDetector" parent="Movement/RunFromMouse" instance=ExtResource("13_5fkdr")] [node name="Shape" type="CollisionShape2D" parent="Movement/RunFromMouse/CursorDetector"] shape = SubResource("CircleShape2D_etpf6") debug_color = Color(1, 0, 0, 0.0470588) [node name="RunFromHunter" parent="Movement" instance=ExtResource("12_x2g3x")] enabled = false [node name="RunFromHunterPriority" parent="Movement/RunFromHunter" instance=ExtResource("11_0jlmk")] [node name="TrackerTracker" parent="Movement/RunFromHunter" instance=ExtResource("14_eqowb")] [connection signal="dragged" from="Draggable" to="." method="_on_draggable_dragged"] [connection signal="dropped" from="Draggable" to="." method="_on_draggable_dropped"] [connection signal="ready" from="Movement" to="Movement" method="enable"] [connection signal="priority_changed_no_args" from="Movement/Idle/IdlePriority" to="Movement" method="enable"] [connection signal="timeout" from="Movement/Idle/BoredTimer" to="Movement/Wander" method="randomize_direction"] [connection signal="changed_direction" from="Movement/Wander" to="Movement/Wander/WanderPriority" method="set_priority_if_truthy" binds= [20]] [connection signal="changed_direction" from="Movement/Wander" to="Movement/Wander/TiredTimer" method="start" unbinds=1] [connection signal="priority_changed_no_args" from="Movement/Wander/WanderPriority" to="Movement" method="enable"] [connection signal="timeout" from="Movement/Wander/TiredTimer" to="Movement/Wander/WanderPriority" method="set_priority" binds= [0]] [connection signal="changed_target" from="Movement/RunFromMouse" to="Movement/RunFromMouse/RunFromMousePriority" method="set_priority_if_truthy" binds= [30]] [connection signal="priority_changed_no_args" from="Movement/RunFromMouse/RunFromMousePriority" to="Movement" method="enable"] [connection signal="cursor_entered" from="Movement/RunFromMouse/CursorDetector" to="Movement/RunFromMouse" method="set_target"] [connection signal="cursor_exited" from="Movement/RunFromMouse/CursorDetector" to="Movement/RunFromMouse" method="clear_target" unbinds=1] [connection signal="changed_target" from="Movement/RunFromHunter" to="Movement/RunFromHunter/RunFromHunterPriority" method="set_priority_if_truthy" binds= [40]] [connection signal="priority_changed_no_args" from="Movement/RunFromHunter/RunFromHunterPriority" to="Movement" method="enable"] [connection signal="tracked" from="Movement/RunFromHunter/TrackerTracker" to="Movement/RunFromHunter" method="set_target"] [connection signal="untracked" from="Movement/RunFromHunter/TrackerTracker" to="Movement/RunFromHunter" method="clear_target" unbinds=1]