1
Fork 0
mirror of https://github.com/Steffo99/hella-farm.git synced 2024-11-25 01:24:23 +00:00
hella-farm/entities/watcher.tscn
2024-05-02 03:36:23 +02:00

465 lines
19 KiB
Text

[gd_scene load_steps=40 format=3 uid="uid://dnjtduk0hla3f"]
[ext_resource type="Script" path="res://entities/watcher.gd" id="1_brahc"]
[ext_resource type="PackedScene" uid="uid://bxbjfev0lhwws" path="res://behaviours/sprite_left_right.tscn" id="1_thu73"]
[ext_resource type="Texture2D" uid="uid://by6igmr52nlyi" path="res://entities/watcher_left.png" id="2_32yw7"]
[ext_resource type="Texture2D" uid="uid://c6tbab5h4osj5" path="res://entities/watcher_right.png" id="3_k8fgk"]
[ext_resource type="PackedScene" uid="uid://djcwis8ycrq85" path="res://behaviours/sampler_priority.tscn" id="4_i1htf"]
[ext_resource type="Texture2D" uid="uid://deqvgvf66grr4" path="res://entities/top_hat.png" id="5_axhwx"]
[ext_resource type="Texture2D" uid="uid://d3tb6ypb36v8e" path="res://entities/monocle.png" id="6_owihj"]
[ext_resource type="Texture2D" uid="uid://dh61knesgvjs" path="res://entities/watcher_drag_left.png" id="7_ff3vx"]
[ext_resource type="PackedScene" uid="uid://tx1qi6ahlxjp" path="res://behaviours/spawner.tscn" id="7_kaba2"]
[ext_resource type="PackedScene" uid="uid://ccul07w0h36nu" path="res://behaviours/sacrificable.tscn" id="7_lxtqq"]
[ext_resource type="PackedScene" uid="uid://8ejgwtkpaa44" path="res://entities/top_hat.tscn" id="8_4xe4s"]
[ext_resource type="Texture2D" uid="uid://b6uurud5clnqr" path="res://entities/watcher_drag_right.png" id="8_5nq2n"]
[ext_resource type="PackedScene" uid="uid://rx24bppccih7" path="res://behaviours/move_physics.tscn" id="8_jy8ay"]
[ext_resource type="PackedScene" uid="uid://cm67ko1k6kn4u" path="res://behaviours/priority.tscn" id="9_wtsor"]
[ext_resource type="PackedScene" uid="uid://ca02sfyaislwu" path="res://behaviours/move_tilt.tscn" id="9_xig8d"]
[ext_resource type="PackedScene" uid="uid://dijcjahkddudv" path="res://behaviours/draggable.tscn" id="10_qbgiu"]
[ext_resource type="PackedScene" uid="uid://b04xhv32ypi42" path="res://entities/monocle.tscn" id="10_wf4xh"]
[ext_resource type="PackedScene" uid="uid://g8t6dt0ye6n3" path="res://behaviours/timer_stddev.tscn" id="11_20lvf"]
[ext_resource type="AudioStream" uid="uid://d0feiq5s6fnux" path="res://entities/imp_drag.wav" id="11_rydo5"]
[ext_resource type="AudioStream" uid="uid://cwsg776c11xfc" path="res://entities/fall.ogg" id="12_0h21e"]
[ext_resource type="PackedScene" uid="uid://dfdr3e32lohq" path="res://behaviours/edible.tscn" id="13_lowgs"]
[ext_resource type="PackedScene" uid="uid://uoxwjpmgg27a" path="res://entities/gold.tscn" id="14_cfqh8"]
[ext_resource type="PackedScene" uid="uid://cml7rqvyfuagx" path="res://behaviours/move_towards.tscn" id="14_qtr50"]
[ext_resource type="PackedScene" uid="uid://ctpn4hvkhxoi3" path="res://behaviours/tracker_edible.tscn" id="15_ihnef"]
[ext_resource type="PackedScene" uid="uid://dti7l0d40hhgt" path="res://behaviours/target_picker.tscn" id="16_ch04y"]
[ext_resource type="PackedScene" uid="uid://jg7qkbswgqjc" path="res://behaviours/eater.tscn" id="19_ktenf"]
[ext_resource type="AudioStream" uid="uid://c1yuksnjdd6g2" path="res://entities/imp_eat.ogg" id="20_bdcer"]
[sub_resource type="CircleShape2D" id="CircleShape2D_mfngl"]
radius = 20.0
[sub_resource type="CircleShape2D" id="CircleShape2D_arucr"]
radius = 20.0
[sub_resource type="CircleShape2D" id="CircleShape2D_diig7"]
radius = 32.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:left_texture")
tracks/1/interp = 1
tracks/1/loop_wrap = true
tracks/1/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 1,
"values": [ExtResource("2_32yw7")]
}
tracks/2/type = "value"
tracks/2/imported = false
tracks/2/enabled = true
tracks/2/path = NodePath("Sprite:right_texture")
tracks/2/interp = 1
tracks/2/loop_wrap = true
tracks/2/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 1,
"values": [ExtResource("3_k8fgk")]
}
tracks/3/type = "value"
tracks/3/imported = false
tracks/3/enabled = true
tracks/3/path = NodePath("Sprite:position")
tracks/3/interp = 1
tracks/3/loop_wrap = true
tracks/3/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 0,
"values": [Vector2(0, 0)]
}
[sub_resource type="Animation" id="Animation_5yt72"]
resource_name = "drag_loop"
length = 2.0
loop_mode = 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),
"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:left_texture")
tracks/1/interp = 1
tracks/1/loop_wrap = true
tracks/1/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 1,
"values": [ExtResource("7_ff3vx")]
}
tracks/2/type = "value"
tracks/2/imported = false
tracks/2/enabled = true
tracks/2/path = NodePath("Sprite:right_texture")
tracks/2/interp = 1
tracks/2/loop_wrap = true
tracks/2/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 1,
"values": [ExtResource("8_5nq2n")]
}
[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:left_texture")
tracks/1/interp = 1
tracks/1/loop_wrap = true
tracks/1/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 1,
"values": [ExtResource("7_ff3vx")]
}
tracks/2/type = "value"
tracks/2/imported = false
tracks/2/enabled = true
tracks/2/path = NodePath("Sprite:right_texture")
tracks/2/interp = 1
tracks/2/loop_wrap = true
tracks/2/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 1,
"values": [ExtResource("8_5nq2n")]
}
[sub_resource type="Animation" id="Animation_lrqld"]
resource_name = "fly"
length = 5.0
loop_mode = 2
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath("Sprite:position")
tracks/0/interp = 2
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0, 1.2, 3.6, 5),
"transitions": PackedFloat32Array(1, 1, 1, 1),
"update": 0,
"values": [Vector2(0, 0), Vector2(0, -6), Vector2(0, 6), Vector2(0, 0)]
}
tracks/1/type = "value"
tracks/1/imported = false
tracks/1/enabled = true
tracks/1/path = NodePath("Sprite:left_texture")
tracks/1/interp = 1
tracks/1/loop_wrap = true
tracks/1/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 1,
"values": [ExtResource("2_32yw7")]
}
tracks/2/type = "value"
tracks/2/imported = false
tracks/2/enabled = true
tracks/2/path = NodePath("Sprite:right_texture")
tracks/2/interp = 1
tracks/2/loop_wrap = true
tracks/2/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 1,
"values": [ExtResource("3_k8fgk")]
}
tracks/3/type = "value"
tracks/3/imported = false
tracks/3/enabled = true
tracks/3/path = NodePath("Sprite:scale")
tracks/3/interp = 1
tracks/3/loop_wrap = true
tracks/3/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 0,
"values": [Vector2(2, 2)]
}
[sub_resource type="AnimationLibrary" id="AnimationLibrary_yam4u"]
_data = {
"RESET": SubResource("Animation_gokbg"),
"drag_loop": SubResource("Animation_5yt72"),
"drag_start": SubResource("Animation_2igbw"),
"fly": SubResource("Animation_lrqld")
}
[sub_resource type="CircleShape2D" id="CircleShape2D_dpwsl"]
radius = 32.0
[sub_resource type="CircleShape2D" id="CircleShape2D_w03iw"]
radius = 256.0
[sub_resource type="CircleShape2D" id="CircleShape2D_ywwo3"]
radius = 32.0
[sub_resource type="CircleShape2D" id="CircleShape2D_3tmg0"]
radius = 40.0
[node name="Watcher" type="CharacterBody2D"]
z_index = 10
collision_layer = 16
collision_mask = 16
script = ExtResource("1_brahc")
[node name="Sprite" parent="." instance=ExtResource("1_thu73")]
unique_name_in_owner = true
scale = Vector2(2, 2)
texture = ExtResource("2_32yw7")
left_texture = ExtResource("2_32yw7")
right_texture = ExtResource("3_k8fgk")
[node name="TopHatter" parent="Sprite" instance=ExtResource("19_ktenf")]
unique_name_in_owner = true
collision_mask = 16
acceptable_diets = Array[StringName]([&"TopHat"])
target = 1
[node name="Sprite" type="Sprite2D" parent="Sprite/TopHatter"]
visible = false
z_index = 1
position = Vector2(-2, -14.5)
texture = ExtResource("5_axhwx")
[node name="Shape" type="CollisionShape2D" parent="Sprite/TopHatter"]
shape = SubResource("CircleShape2D_mfngl")
debug_color = Color(1, 0, 0, 0.294118)
[node name="Spawner" parent="Sprite/TopHatter" instance=ExtResource("7_kaba2")]
scene = ExtResource("8_4xe4s")
enabled = false
[node name="Sacrificable" parent="Sprite/TopHatter" instance=ExtResource("7_lxtqq")]
[node name="Monocler" parent="Sprite" instance=ExtResource("19_ktenf")]
unique_name_in_owner = true
collision_mask = 16
acceptable_diets = Array[StringName]([&"Monocle"])
target = 1
[node name="Sprite" type="Sprite2D" parent="Sprite/Monocler"]
visible = false
z_index = 1
position = Vector2(-1.5, -1.5)
texture = ExtResource("6_owihj")
[node name="Shape" type="CollisionShape2D" parent="Sprite/Monocler"]
shape = SubResource("CircleShape2D_arucr")
debug_color = Color(1, 0, 0, 0.294118)
[node name="Spawner" parent="Sprite/Monocler" instance=ExtResource("7_kaba2")]
scene = ExtResource("10_wf4xh")
enabled = false
[node name="Sacrificable" parent="Sprite/Monocler" instance=ExtResource("7_lxtqq")]
[node name="Shape" type="CollisionShape2D" parent="."]
shape = SubResource("CircleShape2D_diig7")
debug_color = Color(0, 0.6, 1, 0.294118)
[node name="Animator" type="AnimationPlayer" parent="."]
unique_name_in_owner = true
libraries = {
"": SubResource("AnimationLibrary_yam4u")
}
next/drag_loop = &"drag_loop"
next/drag_start = &"drag_loop"
[node name="Edible" parent="." instance=ExtResource("13_lowgs")]
diet = &"Demon"
[node name="Sacrificable" parent="." instance=ExtResource("7_lxtqq")]
kind = &"Watcher"
[node name="GoldSpawner" parent="." instance=ExtResource("7_kaba2")]
scene = ExtResource("14_cfqh8")
[node name="SpawnTimer" parent="GoldSpawner" instance=ExtResource("11_20lvf")]
autostart = true
mean_secs = 0.2
min_secs = 0.1
max_secs = 0.3
[node name="MovementSampler" parent="." instance=ExtResource("4_i1htf")]
[node name="MovementTilt" parent="." instance=ExtResource("9_xig8d")]
min_rotation_speed = -120.0
max_rotation_speed = 120.0
speed = 44.0
direction = Vector2(1, 0)
[node name="TiltPriority" parent="MovementTilt" instance=ExtResource("9_wtsor")]
default_priority = 10
alternative_priority = 10
[node name="TimerStddev" parent="MovementTilt" instance=ExtResource("11_20lvf")]
autostart = true
deviation = 0.3
min_secs = 0.5
max_secs = 1.5
[node name="MovementTrap" parent="." instance=ExtResource("14_qtr50")]
speed = 600.0
enabled = false
[node name="TrapPriority" parent="MovementTrap" instance=ExtResource("9_wtsor")]
alternative_priority = 45
[node name="TrackerTrap" parent="MovementTrap" instance=ExtResource("15_ihnef")]
collision_mask = 8
acceptable_diets = Array[StringName]([&"Trap"])
[node name="Shape" type="CollisionShape2D" parent="MovementTrap/TrackerTrap"]
shape = SubResource("CircleShape2D_dpwsl")
debug_color = Color(1, 1, 0, 0.294118)
[node name="TargetPicker" parent="MovementTrap/TrackerTrap" node_paths=PackedStringArray("tracker") instance=ExtResource("16_ch04y")]
tracker = NodePath("..")
[node name="MovementHunt" parent="." instance=ExtResource("14_qtr50")]
speed = 300.0
enabled = false
[node name="HuntPriority" parent="MovementHunt" instance=ExtResource("9_wtsor")]
alternative_priority = 40
[node name="TrackerMeat" parent="MovementHunt" instance=ExtResource("15_ihnef")]
collision_mask = 48
acceptable_diets = Array[StringName]([&"Meat"])
[node name="Shape" type="CollisionShape2D" parent="MovementHunt/TrackerMeat"]
position = Vector2(4, 29)
shape = SubResource("CircleShape2D_w03iw")
debug_color = Color(1, 1, 0, 0.294118)
[node name="TargetPicker" parent="MovementHunt/TrackerMeat" node_paths=PackedStringArray("tracker") instance=ExtResource("16_ch04y")]
tracker = NodePath("..")
[node name="MovementDrag" parent="." instance=ExtResource("8_jy8ay")]
enabled = false
[node name="DragPriority" parent="MovementDrag" instance=ExtResource("9_wtsor")]
alternative_priority = 50
[node name="Draggable" parent="MovementDrag" instance=ExtResource("10_qbgiu")]
[node name="Shape" type="CollisionShape2D" parent="MovementDrag/Draggable"]
shape = SubResource("CircleShape2D_ywwo3")
debug_color = Color(0, 1, 0.701961, 0.294118)
[node name="DragSound" type="AudioStreamPlayer2D" parent="MovementDrag"]
stream = ExtResource("11_rydo5")
bus = &"DragSounds"
[node name="FallSound" type="AudioStreamPlayer2D" parent="MovementDrag"]
stream = ExtResource("12_0h21e")
bus = &"FallSounds"
[node name="Eater" parent="." instance=ExtResource("19_ktenf")]
unique_name_in_owner = true
collision_mask = 16
acceptable_diets = Array[StringName]([&"Meat"])
[node name="Shape" type="CollisionShape2D" parent="Eater"]
shape = SubResource("CircleShape2D_3tmg0")
debug_color = Color(1, 0, 0, 0.294118)
[node name="EatSound" type="AudioStreamPlayer2D" parent="Eater"]
stream = ExtResource("20_bdcer")
bus = &"KillSounds"
[connection signal="eaten" from="Sprite/TopHatter" to="." method="_on_eater_eaten"]
[connection signal="eaten" from="Sprite/TopHatter" to="Sprite/TopHatter/Spawner" method="enable" unbinds=1]
[connection signal="goal_reached" from="Sprite/TopHatter" to="Sprite/TopHatter/Sprite" method="show"]
[connection signal="goal_reached" from="Sprite/TopHatter" to="Sprite/TopHatter/Sacrificable" method="set_kind" binds= [&"TopHat"]]
[connection signal="tree_exiting" from="Sprite/TopHatter/Spawner" to="Sprite/TopHatter/Spawner" method="spawn"]
[connection signal="sacrificed" from="Sprite/TopHatter/Sacrificable" to="." method="queue_free"]
[connection signal="eaten" from="Sprite/Monocler" to="." method="_on_eater_eaten"]
[connection signal="eaten" from="Sprite/Monocler" to="Sprite/Monocler/Spawner" method="enable" unbinds=1]
[connection signal="goal_reached" from="Sprite/Monocler" to="Sprite/Monocler/Sprite" method="show"]
[connection signal="goal_reached" from="Sprite/Monocler" to="Sprite/Monocler/Sacrificable" method="set_kind" binds= [&"Monocle"]]
[connection signal="tree_exiting" from="Sprite/Monocler/Spawner" to="Sprite/Monocler/Spawner" method="spawn"]
[connection signal="sacrificed" from="Sprite/Monocler/Sacrificable" to="." method="queue_free"]
[connection signal="sacrificed" from="Sacrificable" to="." method="queue_free"]
[connection signal="timeout" from="GoldSpawner/SpawnTimer" to="GoldSpawner" method="spawn"]
[connection signal="move" from="MovementTilt" to="." method="_on_move"]
[connection signal="move_enabled" from="MovementTilt" to="Animator" method="play" binds= [&"fly"]]
[connection signal="ready" from="MovementTilt" to="MovementTilt" method="randomize_rotation_speed"]
[connection signal="ready" from="MovementTilt" to="MovementTilt" method="randomize_direction"]
[connection signal="timeout" from="MovementTilt/TimerStddev" to="MovementTilt" method="randomize_rotation_speed"]
[connection signal="changed_target" from="MovementTrap" to="MovementTrap/TrapPriority" method="priority_conditional"]
[connection signal="move" from="MovementTrap" to="." method="_on_move"]
[connection signal="move_disabled" from="MovementTrap" to="." method="_on_freed"]
[connection signal="move_enabled" from="MovementTrap" to="." method="_on_trapped"]
[connection signal="move_enabled" from="MovementTrap" to="Animator" method="play" binds= [&"RESET"]]
[connection signal="area_entered" from="MovementTrap/TrackerTrap" to="MovementTrap/TrackerTrap" method="check_diet_then_track"]
[connection signal="area_exited" from="MovementTrap/TrackerTrap" to="MovementTrap/TrackerTrap" method="untrack"]
[connection signal="tracked" from="MovementTrap/TrackerTrap" to="MovementTrap/TrackerTrap/TargetPicker" method="sample_target_if_null" unbinds=1]
[connection signal="untracked" from="MovementTrap/TrackerTrap" to="MovementTrap/TrackerTrap/TargetPicker" method="clear_if_target"]
[connection signal="target_changed" from="MovementTrap/TrackerTrap/TargetPicker" to="MovementTrap" method="set_target" unbinds=1]
[connection signal="target_changed" from="MovementTrap/TrackerTrap/TargetPicker" to="MovementTrap/TrackerTrap/TargetPicker" method="sample_target_if_null" unbinds=2]
[connection signal="changed_target" from="MovementHunt" to="MovementHunt/HuntPriority" method="priority_conditional"]
[connection signal="move" from="MovementHunt" to="." method="_on_move"]
[connection signal="move_enabled" from="MovementHunt" to="Animator" method="play" binds= [&"RESET"]]
[connection signal="tracked" from="MovementHunt/TrackerMeat" to="MovementHunt/TrackerMeat/TargetPicker" method="sample_target_if_null" unbinds=1]
[connection signal="untracked" from="MovementHunt/TrackerMeat" to="MovementHunt/TrackerMeat/TargetPicker" method="clear_if_target"]
[connection signal="target_changed" from="MovementHunt/TrackerMeat/TargetPicker" to="MovementHunt" method="set_target" unbinds=1]
[connection signal="target_changed" from="MovementHunt/TrackerMeat/TargetPicker" to="MovementHunt/TrackerMeat/TargetPicker" method="sample_target_if_null" unbinds=2]
[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="Animator" method="play" binds= [&"drag_start"]]
[connection signal="dragged" from="MovementDrag/Draggable" to="MovementDrag" method="drag"]
[connection signal="dropped" from="MovementDrag/Draggable" to="MovementDrag" method="drop"]
[connection signal="eaten" from="Eater" to="." method="_on_eater_eaten"]
[connection signal="eaten" from="Eater" to="Eater/EatSound" method="play" unbinds=1]