[gd_scene load_steps=35 format=3 uid="uid://4d3ksr3171x4"] [ext_resource type="Script" path="res://entities/imp.gd" id="1_dixpc"] [ext_resource type="PackedScene" uid="uid://bxbjfev0lhwws" path="res://behaviours/sprite_left_right.tscn" id="2_eqcdi"] [ext_resource type="Texture2D" uid="uid://crhwsob76ieya" path="res://entities/imp_left.png" id="3_qda0k"] [ext_resource type="Texture2D" uid="uid://bubehid53q8h1" path="res://entities/imp_right.png" id="4_0sckn"] [ext_resource type="PackedScene" uid="uid://tx1qi6ahlxjp" path="res://behaviours/spawner.tscn" id="4_d8lgm"] [ext_resource type="Texture2D" uid="uid://rxtd1rakhj" path="res://entities/imp_drag_left.png" id="5_fpj27"] [ext_resource type="Texture2D" uid="uid://deqvgvf66grr4" path="res://entities/top_hat.png" id="5_w4u6a"] [ext_resource type="PackedScene" uid="uid://uoxwjpmgg27a" path="res://entities/gold.tscn" id="5_yrfoq"] [ext_resource type="Texture2D" uid="uid://dudq4p8owrpsa" path="res://entities/imp_drag_right.png" id="6_1cw6p"] [ext_resource type="Texture2D" uid="uid://d3tb6ypb36v8e" path="res://entities/monocle.png" id="6_jebbv"] [ext_resource type="PackedScene" uid="uid://djcwis8ycrq85" path="res://behaviours/sampler_priority.tscn" id="7_ech8d"] [ext_resource type="PackedScene" uid="uid://ccul07w0h36nu" path="res://behaviours/sacrificable.tscn" id="7_gg20m"] [ext_resource type="PackedScene" uid="uid://dk1ipq7dhkhf3" path="res://behaviours/move_straight.tscn" id="8_ffcw0"] [ext_resource type="PackedScene" uid="uid://cm67ko1k6kn4u" path="res://behaviours/priority.tscn" id="9_2wb1b"] [ext_resource type="PackedScene" uid="uid://g8t6dt0ye6n3" path="res://behaviours/timer_stddev.tscn" id="10_phvea"] [ext_resource type="PackedScene" uid="uid://cml7rqvyfuagx" path="res://behaviours/move_towards.tscn" id="11_4ra22"] [ext_resource type="PackedScene" uid="uid://ctpn4hvkhxoi3" path="res://behaviours/tracker_edible.tscn" id="12_dr2oe"] [ext_resource type="PackedScene" uid="uid://dti7l0d40hhgt" path="res://behaviours/target_picker.tscn" id="13_mwxuf"] [ext_resource type="PackedScene" uid="uid://rx24bppccih7" path="res://behaviours/move_physics.tscn" id="14_p3w0g"] [ext_resource type="PackedScene" uid="uid://jg7qkbswgqjc" path="res://behaviours/eater.tscn" id="14_w2h8x"] [ext_resource type="PackedScene" uid="uid://dijcjahkddudv" path="res://behaviours/draggable.tscn" id="15_otrbh"] [ext_resource type="AudioStream" uid="uid://d0feiq5s6fnux" path="res://entities/imp_drag.wav" id="16_0frai"] [ext_resource type="AudioStream" uid="uid://cwsg776c11xfc" path="res://entities/fall.ogg" id="17_lib0h"] [ext_resource type="AudioStream" uid="uid://c1yuksnjdd6g2" path="res://entities/imp_eat.ogg" id="19_7la6c"] [sub_resource type="CircleShape2D" id="CircleShape2D_6l0s5"] radius = 40.0 [sub_resource type="CircleShape2D" id="CircleShape2D_ide4n"] 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: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:position") tracks/2/interp = 1 tracks/2/loop_wrap = true tracks/2/keys = { "times": PackedFloat32Array(0), "transitions": PackedFloat32Array(1), "update": 0, "values": [Vector2(0, 0)] } tracks/3/type = "value" tracks/3/imported = false tracks/3/enabled = true tracks/3/path = NodePath("Sprite:left_texture") tracks/3/interp = 1 tracks/3/loop_wrap = true tracks/3/keys = { "times": PackedFloat32Array(0), "transitions": PackedFloat32Array(1), "update": 1, "values": [ExtResource("3_qda0k")] } tracks/4/type = "value" tracks/4/imported = false tracks/4/enabled = true tracks/4/path = NodePath("Sprite:right_texture") tracks/4/interp = 1 tracks/4/loop_wrap = true tracks/4/keys = { "times": PackedFloat32Array(0), "transitions": PackedFloat32Array(1), "update": 1, "values": [ExtResource("4_0sckn")] } [sub_resource type="Animation" id="Animation_5yt72"] resource_name = "drag_loop" 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:rotation") tracks/1/interp = 2 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:position") tracks/2/interp = 1 tracks/2/loop_wrap = true tracks/2/keys = { "times": PackedFloat32Array(0, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1), "transitions": PackedFloat32Array(1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1), "update": 0, "values": [Vector2(-2, -2), Vector2(1, -1), Vector2(-1, 1), Vector2(1, 1), Vector2(-2, 0), Vector2(1, 1), Vector2(1, -1), Vector2(-1, 1), Vector2(2, 0), Vector2(-1, -1), Vector2(0, 0)] } tracks/3/type = "value" tracks/3/imported = false tracks/3/enabled = true tracks/3/path = NodePath("Sprite:left_texture") tracks/3/interp = 1 tracks/3/loop_wrap = true tracks/3/keys = { "times": PackedFloat32Array(0), "transitions": PackedFloat32Array(1), "update": 1, "values": [ExtResource("5_fpj27")] } tracks/4/type = "value" tracks/4/imported = false tracks/4/enabled = true tracks/4/path = NodePath("Sprite:right_texture") tracks/4/interp = 1 tracks/4/loop_wrap = true tracks/4/keys = { "times": PackedFloat32Array(0), "transitions": PackedFloat32Array(1), "update": 1, "values": [ExtResource("6_1cw6p")] } [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_fpj27")] } 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_1cw6p")] } [sub_resource type="AnimationLibrary" id="AnimationLibrary_d6oim"] _data = { "RESET": SubResource("Animation_gokbg"), "drag_loop": SubResource("Animation_5yt72"), "drag_start": SubResource("Animation_2igbw") } [sub_resource type="CircleShape2D" id="CircleShape2D_1bmhf"] radius = 256.0 [sub_resource type="CircleShape2D" id="CircleShape2D_swh57"] radius = 25.19 [sub_resource type="CircleShape2D" id="CircleShape2D_50iad"] radius = 32.0 [sub_resource type="CircleShape2D" id="CircleShape2D_qhk1q"] radius = 40.0 [node name="Imp" type="CharacterBody2D"] y_sort_enabled = true collision_layer = 8 collision_mask = 14 motion_mode = 1 script = ExtResource("1_dixpc") [node name="Sprite" parent="." instance=ExtResource("2_eqcdi")] unique_name_in_owner = true y_sort_enabled = true scale = Vector2(2, 2) texture = ExtResource("3_qda0k") left_texture = ExtResource("3_qda0k") right_texture = ExtResource("4_0sckn") [node name="TopHatter" parent="Sprite" instance=ExtResource("14_w2h8x")] unique_name_in_owner = true scale = Vector2(0.5, 0.5) acceptable_diets = Array[StringName]([&"TopHat"]) target = 1 [node name="Sprite" type="Sprite2D" parent="Sprite/TopHatter"] visible = false z_index = 1 position = Vector2(-1, -34) scale = Vector2(2, 2) texture = ExtResource("5_w4u6a") [node name="Shape" type="CollisionShape2D" parent="Sprite/TopHatter"] shape = SubResource("CircleShape2D_6l0s5") debug_color = Color(1, 0, 0, 0) [node name="Monocler" parent="Sprite" instance=ExtResource("14_w2h8x")] unique_name_in_owner = true scale = Vector2(0.5, 0.5) acceptable_diets = Array[StringName]([&"Monocle"]) target = 1 [node name="Sprite" type="Sprite2D" parent="Sprite/Monocler"] visible = false z_index = 1 position = Vector2(7, -10) scale = Vector2(2, 2) texture = ExtResource("6_jebbv") [node name="Shape" type="CollisionShape2D" parent="Sprite/Monocler"] shape = SubResource("CircleShape2D_6l0s5") debug_color = Color(1, 0, 0, 0) [node name="Shape" type="CollisionShape2D" parent="."] shape = SubResource("CircleShape2D_ide4n") [node name="Animator" type="AnimationPlayer" parent="."] unique_name_in_owner = true libraries = { "": SubResource("AnimationLibrary_d6oim") } next/drag_loop = &"drag_loop" next/drag_start = &"drag_loop" [node name="Sacrificable" parent="." instance=ExtResource("7_gg20m")] kind = &"Imp" [node name="GoldSpawner" parent="." instance=ExtResource("4_d8lgm")] scene = ExtResource("5_yrfoq") [node name="SpawnTimer" parent="GoldSpawner" instance=ExtResource("10_phvea")] autostart = true mean_secs = 5.0 deviation = 4.0 min_secs = 1.0 max_secs = 9.0 [node name="MovementSampler" parent="." instance=ExtResource("7_ech8d")] [node name="MovementWander" parent="." instance=ExtResource("8_ffcw0")] speed = 25.0 enabled = false [node name="WanderPriority" parent="MovementWander" instance=ExtResource("9_2wb1b")] default_priority = 10 alternative_priority = 10 [node name="ChangeDirectionTimer" parent="MovementWander" instance=ExtResource("10_phvea")] autostart = true mean_secs = 2.0 deviation = 2.0 min_secs = 0.6 max_secs = 3.0 [node name="MovementHunt" parent="." instance=ExtResource("11_4ra22")] speed = 110.0 enabled = false [node name="HuntPriority" parent="MovementHunt" instance=ExtResource("9_2wb1b")] alternative_priority = 40 [node name="TrackerMeat" parent="MovementHunt" instance=ExtResource("12_dr2oe")] acceptable_diets = Array[StringName]([&"Meat"]) [node name="Shape" type="CollisionShape2D" parent="MovementHunt/TrackerMeat"] shape = SubResource("CircleShape2D_1bmhf") debug_color = Color(1, 0.498039, 0, 0) [node name="TargetPicker" parent="MovementHunt/TrackerMeat" node_paths=PackedStringArray("tracker") instance=ExtResource("13_mwxuf")] tracker = NodePath("..") [node name="MovementTrap" parent="." instance=ExtResource("11_4ra22")] y_sort_enabled = true speed = 600.0 enabled = false [node name="TrapPriority" parent="MovementTrap" instance=ExtResource("9_2wb1b")] alternative_priority = 45 [node name="TrackerTrap" parent="MovementTrap" instance=ExtResource("12_dr2oe")] collision_mask = 8 acceptable_diets = Array[StringName]([&"Trap"]) [node name="Shape" type="CollisionShape2D" parent="MovementTrap/TrackerTrap"] shape = SubResource("CircleShape2D_swh57") debug_color = Color(1, 0.498039, 0, 0) [node name="TargetPicker" parent="MovementTrap/TrackerTrap" node_paths=PackedStringArray("tracker") instance=ExtResource("13_mwxuf")] tracker = NodePath("..") [node name="MovementDrag" parent="." instance=ExtResource("14_p3w0g")] enabled = false [node name="DragPriority" parent="MovementDrag" instance=ExtResource("9_2wb1b")] alternative_priority = 50 [node name="Draggable" parent="MovementDrag" instance=ExtResource("15_otrbh")] [node name="Shape" type="CollisionShape2D" parent="MovementDrag/Draggable"] shape = SubResource("CircleShape2D_50iad") debug_color = Color(1, 1, 1, 0) [node name="DragSound" type="AudioStreamPlayer2D" parent="MovementDrag"] stream = ExtResource("16_0frai") bus = &"DragSounds" [node name="FallSound" type="AudioStreamPlayer2D" parent="MovementDrag"] stream = ExtResource("17_lib0h") bus = &"FallSounds" [node name="Eater" parent="." instance=ExtResource("14_w2h8x")] unique_name_in_owner = true acceptable_diets = Array[StringName]([&"Meat"]) [node name="Shape" type="CollisionShape2D" parent="Eater"] shape = SubResource("CircleShape2D_qhk1q") debug_color = Color(1, 0, 0, 0) [node name="EatSound" type="AudioStreamPlayer2D" parent="Eater"] stream = ExtResource("19_7la6c") bus = &"KillSounds" [connection signal="eaten" from="Sprite/TopHatter" to="." method="_on_eater_eaten"] [connection signal="goal_reached" from="Sprite/TopHatter" to="Sprite/TopHatter/Sprite" method="show"] [connection signal="eaten" from="Sprite/Monocler" to="." method="_on_eater_eaten"] [connection signal="goal_reached" from="Sprite/Monocler" to="Sprite/Monocler/Sprite" method="show"] [connection signal="sacrificed" from="Sacrificable" to="." method="queue_free"] [connection signal="timeout" from="GoldSpawner/SpawnTimer" to="GoldSpawner" method="spawn"] [connection signal="changed_direction" from="MovementWander" to="MovementWander/WanderPriority" method="priority_conditional"] [connection signal="move" from="MovementWander" to="." method="_on_move"] [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" 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="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="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="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="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]