1
Fork 0
mirror of https://github.com/Steffo99/hella-farm.git synced 2024-11-22 08:04:23 +00:00
hella-farm/entities/sheep.tscn
2024-04-26 03:57:07 +02:00

328 lines
13 KiB
Text

[gd_scene load_steps=26 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="Texture2D" uid="uid://cxtmas4g0v6en" path="res://entities/sheep_right.png" id="4_5qoof"]
[ext_resource type="Texture2D" uid="uid://cfduc7cdorasr" path="res://entities/sheep_drag_left.png" id="5_gh6h6"]
[ext_resource type="PackedScene" uid="uid://dfdr3e32lohq" path="res://behaviours/edible.tscn" id="6_3odsh"]
[ext_resource type="Texture2D" uid="uid://m5bebwb06kqe" path="res://entities/sheep_drag_right.png" id="6_x4fsj"]
[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://g8t6dt0ye6n3" path="res://behaviours/timer_stddev.tscn" id="12_c45uk"]
[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://dti7l0d40hhgt" path="res://behaviours/target_picker.tscn" id="13_jf6em"]
[ext_resource type="PackedScene" uid="uid://dijcjahkddudv" path="res://behaviours/draggable.tscn" id="14_0b1hs"]
[ext_resource type="PackedScene" uid="uid://rx24bppccih7" path="res://behaviours/move_physics.tscn" id="14_3wojv"]
[ext_resource type="PackedScene" uid="uid://c5pyp5hvthdof" path="res://behaviours/tracker_tracker.tscn" id="14_eqowb"]
[ext_resource type="AudioStream" uid="uid://bmfscpnugaejk" path="res://entities/sheep_drag.wav" id="16_nswfl"]
[ext_resource type="AudioStream" uid="uid://cwsg776c11xfc" path="res://entities/fall.ogg" id="17_8kst2"]
[sub_resource type="CircleShape2D" id="CircleShape2D_c5tcn"]
radius = 24.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:scale")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 0,
"values": [Vector2(2, 2)]
}
tracks/1/type = "value"
tracks/1/imported = false
tracks/1/enabled = true
tracks/1/path = NodePath("Sprite:rotation")
tracks/1/interp = 1
tracks/1/loop_wrap = true
tracks/1/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 0,
"values": [0.0]
}
tracks/2/type = "value"
tracks/2/imported = false
tracks/2/enabled = true
tracks/2/path = NodePath("Sprite:left_texture")
tracks/2/interp = 1
tracks/2/loop_wrap = true
tracks/2/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 1,
"values": [ExtResource("2_t13f5")]
}
tracks/3/type = "value"
tracks/3/imported = false
tracks/3/enabled = true
tracks/3/path = NodePath("Sprite:right_texture")
tracks/3/interp = 1
tracks/3/loop_wrap = true
tracks/3/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 1,
"values": [ExtResource("4_5qoof")]
}
[sub_resource type="Animation" id="Animation_5yt72"]
resource_name = "drag_loop"
length = 1.2
loop_mode = 2
step = 0.3
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath("Sprite:scale")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 0,
"values": [Vector2(2.4, 2.4)]
}
tracks/1/type = "value"
tracks/1/imported = false
tracks/1/enabled = true
tracks/1/path = NodePath("Sprite:rotation")
tracks/1/interp = 2
tracks/1/loop_wrap = true
tracks/1/keys = {
"times": PackedFloat32Array(0, 1.2),
"transitions": PackedFloat32Array(1, 1),
"update": 0,
"values": [0.0872665, -0.0872665]
}
tracks/2/type = "value"
tracks/2/imported = false
tracks/2/enabled = true
tracks/2/path = NodePath("Sprite:left_texture")
tracks/2/interp = 1
tracks/2/loop_wrap = true
tracks/2/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 1,
"values": [ExtResource("5_gh6h6")]
}
tracks/3/type = "value"
tracks/3/imported = false
tracks/3/enabled = true
tracks/3/path = NodePath("Sprite:right_texture")
tracks/3/interp = 1
tracks/3/loop_wrap = true
tracks/3/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 1,
"values": [ExtResource("6_x4fsj")]
}
[sub_resource type="Animation" id="Animation_2igbw"]
resource_name = "drag_start"
length = 0.2
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath("Sprite:scale")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0, 0.2),
"transitions": PackedFloat32Array(1, 1),
"update": 0,
"values": [Vector2(2, 2), Vector2(2.4, 2.4)]
}
tracks/1/type = "value"
tracks/1/imported = false
tracks/1/enabled = true
tracks/1/path = NodePath("Sprite:rotation")
tracks/1/interp = 1
tracks/1/loop_wrap = true
tracks/1/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 0,
"values": [0.0]
}
tracks/2/type = "value"
tracks/2/imported = false
tracks/2/enabled = true
tracks/2/path = NodePath("Sprite:left_texture")
tracks/2/interp = 1
tracks/2/loop_wrap = true
tracks/2/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 1,
"values": [ExtResource("5_gh6h6")]
}
tracks/3/type = "value"
tracks/3/imported = false
tracks/3/enabled = true
tracks/3/path = NodePath("Sprite:right_texture")
tracks/3/interp = 1
tracks/3/loop_wrap = true
tracks/3/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 1,
"values": [ExtResource("6_x4fsj")]
}
[sub_resource type="AnimationLibrary" id="AnimationLibrary_6mutq"]
_data = {
"RESET": SubResource("Animation_gokbg"),
"drag_loop": SubResource("Animation_5yt72"),
"drag_start": SubResource("Animation_2igbw")
}
[sub_resource type="CircleShape2D" id="CircleShape2D_etpf6"]
radius = 144.0
[node name="Sheep" type="CharacterBody2D"]
collision_layer = 8
collision_mask = 14
motion_mode = 1
script = ExtResource("1_4dmll")
[node name="Sprite" parent="." instance=ExtResource("2_xbkrm")]
unique_name_in_owner = true
position = Vector2(0, -4)
scale = Vector2(2, 2)
texture = ExtResource("2_t13f5")
left_texture = ExtResource("2_t13f5")
right_texture = ExtResource("4_5qoof")
[node name="Shape" type="CollisionShape2D" parent="."]
shape = SubResource("CircleShape2D_c5tcn")
[node name="Animator" type="AnimationPlayer" parent="."]
unique_name_in_owner = true
libraries = {
"": SubResource("AnimationLibrary_6mutq")
}
next/drag_loop = &"drag_loop"
next/drag_start = &"drag_loop"
blend_times = [&"drag_start", &"drag_loop", 0.5]
[node name="Edible" parent="." instance=ExtResource("6_3odsh")]
diet = &"Meat"
[node name="MovementSampler" parent="." instance=ExtResource("9_s5lod")]
[node name="MovementIdle" parent="." instance=ExtResource("10_05kcd")]
speed = 0.0
enabled = false
[node name="IdlePriority" parent="MovementIdle" instance=ExtResource("11_0jlmk")]
default_priority = 10
alternative_priority = 10
[node name="BoredTimer" parent="MovementIdle" instance=ExtResource("12_c45uk")]
one_shot = true
autostart = true
mean_secs = 3.0
min_secs = 1.0
max_secs = 5.0
[node name="MovementWander" parent="." instance=ExtResource("10_05kcd")]
speed = 33.0
enabled = false
[node name="WanderPriority" parent="MovementWander" instance=ExtResource("11_0jlmk")]
alternative_priority = 20
[node name="TiredTimer" parent="MovementWander" instance=ExtResource("12_c45uk")]
one_shot = true
min_secs = 0.3
max_secs = 1.5
[node name="MovementRunFromMouse" parent="." instance=ExtResource("12_x2g3x")]
speed = -66.0
enabled = false
[node name="RunFromMousePriority" parent="MovementRunFromMouse" instance=ExtResource("11_0jlmk")]
alternative_priority = 30
[node name="CursorSense" parent="MovementRunFromMouse" instance=ExtResource("13_5fkdr")]
[node name="Shape" type="CollisionShape2D" parent="MovementRunFromMouse/CursorSense"]
shape = SubResource("CircleShape2D_etpf6")
debug_color = Color(1, 1, 0, 0)
[node name="MovementRunFromHunter" parent="." instance=ExtResource("12_x2g3x")]
speed = -66.0
enabled = false
[node name="RunFromHunterPriority" parent="MovementRunFromHunter" instance=ExtResource("11_0jlmk")]
alternative_priority = 40
[node name="HunterSense" parent="MovementRunFromHunter" instance=ExtResource("14_eqowb")]
[node name="Shape" type="CollisionShape2D" parent="MovementRunFromHunter/HunterSense"]
shape = SubResource("CircleShape2D_etpf6")
debug_color = Color(1, 1, 0, 0)
[node name="TargetPicker" parent="MovementRunFromHunter/HunterSense" node_paths=PackedStringArray("tracker") instance=ExtResource("13_jf6em")]
tracker = NodePath("..")
[node name="MovementDrag" parent="." instance=ExtResource("14_3wojv")]
enabled = false
[node name="DragPriority" parent="MovementDrag" instance=ExtResource("11_0jlmk")]
alternative_priority = 50
[node name="Draggable" parent="MovementDrag" instance=ExtResource("14_0b1hs")]
[node name="Shape" type="CollisionShape2D" parent="MovementDrag/Draggable"]
scale = Vector2(3, 3)
shape = SubResource("CircleShape2D_c5tcn")
debug_color = Color(1, 1, 1, 0)
[node name="DragSound" type="AudioStreamPlayer2D" parent="MovementDrag"]
stream = ExtResource("16_nswfl")
[node name="FallSound" type="AudioStreamPlayer2D" parent="MovementDrag"]
stream = ExtResource("17_8kst2")
[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="timeout" from="MovementIdle/BoredTimer" to="MovementWander" method="randomize_direction"]
[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/TiredTimer" method="stop"]
[connection signal="move_enabled" from="MovementWander" to="MovementWander/TiredTimer" method="start"]
[connection signal="timeout" from="MovementWander/TiredTimer" to="MovementWander" method="clear_direction"]
[connection signal="changed_target" from="MovementRunFromMouse" to="MovementRunFromMouse/RunFromMousePriority" method="priority_conditional"]
[connection signal="move" from="MovementRunFromMouse" to="." method="_on_move"]
[connection signal="move_enabled" from="MovementRunFromMouse" to="MovementWander" method="clear_direction"]
[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]
[connection signal="changed_target" from="MovementRunFromHunter" to="MovementRunFromHunter/RunFromHunterPriority" method="priority_conditional"]
[connection signal="move" from="MovementRunFromHunter" to="." method="_on_move"]
[connection signal="move_disabled" from="MovementRunFromHunter" to="MovementWander" method="clear_direction"]
[connection signal="tracked" from="MovementRunFromHunter/HunterSense" to="MovementRunFromHunter/HunterSense/TargetPicker" method="set_target_if_null"]
[connection signal="untracked" from="MovementRunFromHunter/HunterSense" to="MovementRunFromHunter/HunterSense/TargetPicker" method="clear_if_target"]
[connection signal="target_changed" from="MovementRunFromHunter/HunterSense/TargetPicker" to="MovementRunFromHunter" method="set_target" unbinds=1]
[connection signal="dragged" from="MovementDrag" to="." method="_on_dragged"]
[connection signal="dragged" from="MovementDrag" to="MovementDrag/DragPriority" method="priority_alternative" unbinds=1]
[connection signal="dragged" from="MovementDrag" to="MovementDrag/DragSound" method="play" unbinds=1]
[connection signal="fallen" from="MovementDrag" to="." method="_on_fallen"]
[connection signal="fallen" from="MovementDrag" to="MovementDrag/DragPriority" method="priority_default"]
[connection signal="fallen" from="MovementDrag" to="MovementDrag/FallSound" method="play"]
[connection signal="move" from="MovementDrag" to="." method="_on_move"]
[connection signal="move_enabled" from="MovementDrag" to="MovementWander" method="clear_direction"]
[connection signal="dragged" from="MovementDrag/Draggable" to="MovementDrag" method="drag"]
[connection signal="dropped" from="MovementDrag/Draggable" to="MovementDrag" method="drop"]