2024-04-17 03:54:16 +00:00
|
|
|
[gd_scene load_steps=19 format=3 uid="uid://bc2bm8lbol18w"]
|
2024-04-13 14:38:05 +00:00
|
|
|
|
2024-04-14 03:13:37 +00:00
|
|
|
[ext_resource type="Script" path="res://entities/sheep.gd" id="1_4dmll"]
|
2024-04-15 03:43:15 +00:00
|
|
|
[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="Texture2D" uid="uid://cxtmas4g0v6en" path="res://entities/sheep_right.png" id="4_5qoof"]
|
2024-04-14 21:29:39 +00:00
|
|
|
[ext_resource type="PackedScene" uid="uid://dfdr3e32lohq" path="res://behaviours/edible.tscn" id="6_3odsh"]
|
2024-04-17 02:52:11 +00:00
|
|
|
[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"]
|
2024-04-17 03:45:34 +00:00
|
|
|
[ext_resource type="PackedScene" uid="uid://g8t6dt0ye6n3" path="res://behaviours/timer_stddev.tscn" id="12_c45uk"]
|
2024-04-17 02:52:11 +00:00
|
|
|
[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"]
|
2024-04-13 14:38:05 +00:00
|
|
|
|
2024-04-14 03:23:52 +00:00
|
|
|
[sub_resource type="CircleShape2D" id="CircleShape2D_c5tcn"]
|
2024-04-15 03:43:15 +00:00
|
|
|
radius = 8.0
|
2024-04-13 14:38:05 +00:00
|
|
|
|
2024-04-15 20:20:13 +00:00
|
|
|
[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)]
|
|
|
|
}
|
|
|
|
|
2024-04-16 02:04:46 +00:00
|
|
|
[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]
|
|
|
|
}
|
|
|
|
|
2024-04-15 20:20:13 +00:00
|
|
|
[sub_resource type="AnimationLibrary" id="AnimationLibrary_6mutq"]
|
|
|
|
_data = {
|
|
|
|
"RESET": SubResource("Animation_gokbg"),
|
|
|
|
"shake": SubResource("Animation_s7ekl"),
|
|
|
|
"wobble": SubResource("Animation_lxieb")
|
|
|
|
}
|
|
|
|
|
2024-04-17 02:52:11 +00:00
|
|
|
[sub_resource type="CircleShape2D" id="CircleShape2D_etpf6"]
|
|
|
|
radius = 144.0
|
|
|
|
|
2024-04-14 03:13:37 +00:00
|
|
|
[node name="Sheep" type="CharacterBody2D"]
|
2024-04-14 18:53:45 +00:00
|
|
|
collision_layer = 8
|
|
|
|
collision_mask = 14
|
2024-04-14 03:13:37 +00:00
|
|
|
script = ExtResource("1_4dmll")
|
2024-04-13 14:38:05 +00:00
|
|
|
|
2024-04-15 03:43:15 +00:00
|
|
|
[node name="Sprite" parent="." instance=ExtResource("2_xbkrm")]
|
2024-04-15 20:20:13 +00:00
|
|
|
position = Vector2(1, 1)
|
2024-04-15 03:43:15 +00:00
|
|
|
scale = Vector2(2, 2)
|
|
|
|
texture = ExtResource("2_t13f5")
|
|
|
|
left_texture = ExtResource("2_t13f5")
|
|
|
|
right_texture = ExtResource("4_5qoof")
|
|
|
|
|
2024-04-14 03:23:52 +00:00
|
|
|
[node name="Shape" type="CollisionShape2D" parent="."]
|
2024-04-15 03:43:15 +00:00
|
|
|
scale = Vector2(3, 3)
|
2024-04-14 03:23:52 +00:00
|
|
|
shape = SubResource("CircleShape2D_c5tcn")
|
|
|
|
|
2024-04-15 20:20:13 +00:00
|
|
|
[node name="Animator" type="AnimationPlayer" parent="."]
|
|
|
|
libraries = {
|
|
|
|
"": SubResource("AnimationLibrary_6mutq")
|
|
|
|
}
|
|
|
|
|
2024-04-17 02:52:11 +00:00
|
|
|
[node name="Edible" parent="." instance=ExtResource("6_3odsh")]
|
2024-04-18 23:41:30 +00:00
|
|
|
diet = &"Meat"
|
2024-04-17 02:52:11 +00:00
|
|
|
|
2024-04-17 03:26:13 +00:00
|
|
|
[node name="MovementSampler" parent="." node_paths=PackedStringArray("possibilities") instance=ExtResource("9_s5lod")]
|
|
|
|
possibilities = [NodePath("../MovementIdle/IdlePriority"), NodePath("../MovementWander/WanderPriority"), NodePath("../MovementRunFromMouse/RunFromMousePriority"), NodePath("../MovementRunFromHunter/RunFromHunterPriority")]
|
2024-04-17 02:52:11 +00:00
|
|
|
|
2024-04-17 03:26:13 +00:00
|
|
|
[node name="MovementIdle" parent="." instance=ExtResource("10_05kcd")]
|
2024-04-17 03:29:45 +00:00
|
|
|
speed = 0.0
|
2024-04-17 02:52:11 +00:00
|
|
|
enabled = false
|
|
|
|
|
2024-04-17 03:26:13 +00:00
|
|
|
[node name="IdlePriority" parent="MovementIdle" instance=ExtResource("11_0jlmk")]
|
2024-04-18 23:33:44 +00:00
|
|
|
alternative_priority = 0
|
2024-04-17 02:52:11 +00:00
|
|
|
|
2024-04-17 03:45:34 +00:00
|
|
|
[node name="BoredTimer" parent="MovementIdle" instance=ExtResource("12_c45uk")]
|
2024-04-17 02:52:11 +00:00
|
|
|
one_shot = true
|
2024-04-17 03:45:34 +00:00
|
|
|
autostart = true
|
|
|
|
mean_secs = 3.0
|
|
|
|
min_secs = 1.0
|
|
|
|
max_secs = 5.0
|
2024-04-17 02:52:11 +00:00
|
|
|
|
2024-04-17 03:26:13 +00:00
|
|
|
[node name="MovementWander" parent="." instance=ExtResource("10_05kcd")]
|
2024-04-17 03:29:45 +00:00
|
|
|
speed = 66.0
|
2024-04-17 02:52:11 +00:00
|
|
|
enabled = false
|
|
|
|
|
2024-04-17 03:26:13 +00:00
|
|
|
[node name="WanderPriority" parent="MovementWander" instance=ExtResource("11_0jlmk")]
|
2024-04-18 23:33:44 +00:00
|
|
|
alternative_priority = 20
|
2024-04-17 02:52:11 +00:00
|
|
|
|
2024-04-17 03:45:34 +00:00
|
|
|
[node name="TiredTimer" parent="MovementWander" instance=ExtResource("12_c45uk")]
|
2024-04-17 02:52:11 +00:00
|
|
|
one_shot = true
|
2024-04-17 03:45:34 +00:00
|
|
|
min_secs = 0.3
|
|
|
|
max_secs = 1.5
|
2024-04-17 02:52:11 +00:00
|
|
|
|
2024-04-17 03:26:13 +00:00
|
|
|
[node name="MovementRunFromMouse" parent="." instance=ExtResource("12_x2g3x")]
|
2024-04-17 03:29:45 +00:00
|
|
|
speed = -100.0
|
2024-04-17 02:52:11 +00:00
|
|
|
enabled = false
|
|
|
|
|
2024-04-17 03:26:13 +00:00
|
|
|
[node name="RunFromMousePriority" parent="MovementRunFromMouse" instance=ExtResource("11_0jlmk")]
|
2024-04-18 23:33:44 +00:00
|
|
|
alternative_priority = 30
|
2024-04-17 02:52:11 +00:00
|
|
|
|
2024-04-17 03:26:13 +00:00
|
|
|
[node name="CursorSense" parent="MovementRunFromMouse" instance=ExtResource("13_5fkdr")]
|
2024-04-17 02:52:11 +00:00
|
|
|
|
2024-04-17 03:26:13 +00:00
|
|
|
[node name="Shape" type="CollisionShape2D" parent="MovementRunFromMouse/CursorSense"]
|
2024-04-17 02:52:11 +00:00
|
|
|
shape = SubResource("CircleShape2D_etpf6")
|
|
|
|
debug_color = Color(1, 0, 0, 0.0470588)
|
|
|
|
|
2024-04-17 03:26:13 +00:00
|
|
|
[node name="MovementRunFromHunter" parent="." instance=ExtResource("12_x2g3x")]
|
2024-04-17 03:29:45 +00:00
|
|
|
speed = -100.0
|
2024-04-17 02:52:11 +00:00
|
|
|
enabled = false
|
|
|
|
|
2024-04-17 03:26:13 +00:00
|
|
|
[node name="RunFromHunterPriority" parent="MovementRunFromHunter" instance=ExtResource("11_0jlmk")]
|
2024-04-17 02:52:11 +00:00
|
|
|
|
2024-04-17 03:26:13 +00:00
|
|
|
[node name="HunterSense" parent="MovementRunFromHunter" instance=ExtResource("14_eqowb")]
|
2024-04-17 03:01:02 +00:00
|
|
|
|
2024-04-17 03:26:13 +00:00
|
|
|
[connection signal="ready" from="MovementSampler" to="MovementSampler" method="enable"]
|
|
|
|
[connection signal="move" from="MovementIdle" to="." method="_on_move"]
|
|
|
|
[connection signal="move_disabled" from="MovementIdle" to="MovementIdle/BoredTimer" method="stop"]
|
|
|
|
[connection signal="move_enabled" from="MovementIdle" to="MovementIdle/BoredTimer" method="start"]
|
|
|
|
[connection signal="priority_changed_no_args" from="MovementIdle/IdlePriority" to="MovementSampler" method="enable"]
|
|
|
|
[connection signal="timeout" from="MovementIdle/BoredTimer" to="MovementWander" method="randomize_direction"]
|
2024-04-18 23:33:44 +00:00
|
|
|
[connection signal="changed_direction" from="MovementWander" to="MovementWander/WanderPriority" method="priority_conditional"]
|
2024-04-17 03:26:13 +00:00
|
|
|
[connection signal="move" from="MovementWander" to="." method="_on_move"]
|
|
|
|
[connection signal="move_disabled" from="MovementWander" to="MovementWander/TiredTimer" method="stop"]
|
|
|
|
[connection signal="move_enabled" from="MovementWander" to="MovementWander/TiredTimer" method="start"]
|
|
|
|
[connection signal="priority_changed_no_args" from="MovementWander/WanderPriority" to="MovementSampler" method="enable"]
|
|
|
|
[connection signal="timeout" from="MovementWander/TiredTimer" to="MovementWander" method="clear_direction"]
|
2024-04-18 23:33:44 +00:00
|
|
|
[connection signal="changed_target" from="MovementRunFromMouse" to="MovementRunFromMouse/RunFromMousePriority" method="priority_conditional"]
|
2024-04-17 03:26:13 +00:00
|
|
|
[connection signal="move" from="MovementRunFromMouse" to="." method="_on_move"]
|
|
|
|
[connection signal="move_enabled" from="MovementRunFromMouse" to="MovementWander" method="clear_direction"]
|
|
|
|
[connection signal="priority_changed_no_args" from="MovementRunFromMouse/RunFromMousePriority" to="MovementSampler" method="enable"]
|
|
|
|
[connection signal="cursor_entered" from="MovementRunFromMouse/CursorSense" to="MovementRunFromMouse" method="set_target"]
|
|
|
|
[connection signal="cursor_exited" from="MovementRunFromMouse/CursorSense" to="MovementRunFromMouse" method="clear_target" unbinds=1]
|
2024-04-18 23:33:44 +00:00
|
|
|
[connection signal="changed_target" from="MovementRunFromHunter" to="MovementRunFromHunter/RunFromHunterPriority" method="priority_conditional"]
|
2024-04-17 03:26:13 +00:00
|
|
|
[connection signal="move" from="MovementRunFromHunter" to="." method="_on_move"]
|
|
|
|
[connection signal="move_disabled" from="MovementRunFromHunter" to="MovementWander" method="clear_direction"]
|
|
|
|
[connection signal="priority_changed_no_args" from="MovementRunFromHunter/RunFromHunterPriority" to="MovementSampler" method="enable"]
|
|
|
|
[connection signal="tracked" from="MovementRunFromHunter/HunterSense" to="MovementRunFromHunter" method="set_target"]
|
|
|
|
[connection signal="untracked" from="MovementRunFromHunter/HunterSense" to="MovementRunFromHunter" method="clear_target" unbinds=1]
|