2024-04-21 23:21:19 +00:00
|
|
|
[gd_scene load_steps=24 format=3 uid="uid://4d3ksr3171x4"]
|
2024-04-14 21:29:39 +00:00
|
|
|
|
|
|
|
[ext_resource type="Script" path="res://entities/imp.gd" id="1_dixpc"]
|
2024-04-15 04:07:49 +00:00
|
|
|
[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"]
|
2024-04-16 01:57:04 +00:00
|
|
|
[ext_resource type="PackedScene" uid="uid://tx1qi6ahlxjp" path="res://behaviours/spawner.tscn" id="4_d8lgm"]
|
2024-04-15 00:45:18 +00:00
|
|
|
[ext_resource type="PackedScene" uid="uid://uoxwjpmgg27a" path="res://entities/gold.tscn" id="5_yrfoq"]
|
2024-04-18 23:45:43 +00:00
|
|
|
[ext_resource type="PackedScene" uid="uid://djcwis8ycrq85" path="res://behaviours/sampler_priority.tscn" id="7_ech8d"]
|
|
|
|
[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"]
|
2024-04-20 03:00:23 +00:00
|
|
|
[ext_resource type="PackedScene" uid="uid://rx24bppccih7" path="res://behaviours/move_physics.tscn" id="14_p3w0g"]
|
2024-04-19 01:39:07 +00:00
|
|
|
[ext_resource type="PackedScene" uid="uid://jg7qkbswgqjc" path="res://behaviours/eater.tscn" id="14_w2h8x"]
|
2024-04-20 03:00:23 +00:00
|
|
|
[ext_resource type="PackedScene" uid="uid://dijcjahkddudv" path="res://behaviours/draggable.tscn" id="15_otrbh"]
|
2024-04-21 23:21:19 +00:00
|
|
|
[ext_resource type="AudioStream" uid="uid://d0feiq5s6fnux" path="res://entities/imp_drag.wav" id="16_0frai"]
|
2024-04-21 23:05:21 +00:00
|
|
|
[ext_resource type="AudioStream" uid="uid://cwsg776c11xfc" path="res://entities/fall.ogg" id="17_lib0h"]
|
2024-04-21 23:21:19 +00:00
|
|
|
[ext_resource type="AudioStream" uid="uid://c1yuksnjdd6g2" path="res://entities/imp_eat.ogg" id="19_7la6c"]
|
2024-04-14 21:29:39 +00:00
|
|
|
|
2024-04-15 04:07:49 +00:00
|
|
|
[sub_resource type="CircleShape2D" id="CircleShape2D_ide4n"]
|
2024-04-20 03:00:23 +00:00
|
|
|
radius = 32.0
|
2024-04-14 21:29:39 +00:00
|
|
|
|
2024-04-18 23:45:43 +00:00
|
|
|
[sub_resource type="CircleShape2D" id="CircleShape2D_1bmhf"]
|
|
|
|
radius = 256.0
|
|
|
|
|
2024-04-20 03:00:23 +00:00
|
|
|
[sub_resource type="CircleShape2D" id="CircleShape2D_50iad"]
|
|
|
|
radius = 32.0
|
|
|
|
|
2024-04-19 01:39:07 +00:00
|
|
|
[sub_resource type="CircleShape2D" id="CircleShape2D_qhk1q"]
|
|
|
|
radius = 40.0
|
|
|
|
|
2024-04-14 21:29:39 +00:00
|
|
|
[node name="Imp" type="CharacterBody2D"]
|
|
|
|
collision_layer = 8
|
|
|
|
collision_mask = 14
|
2024-04-19 16:19:37 +00:00
|
|
|
motion_mode = 1
|
2024-04-14 21:29:39 +00:00
|
|
|
script = ExtResource("1_dixpc")
|
|
|
|
|
2024-04-15 04:07:49 +00:00
|
|
|
[node name="Sprite" parent="." instance=ExtResource("2_eqcdi")]
|
|
|
|
scale = Vector2(2, 2)
|
|
|
|
texture = ExtResource("3_qda0k")
|
|
|
|
left_texture = ExtResource("3_qda0k")
|
|
|
|
right_texture = ExtResource("4_0sckn")
|
2024-04-14 21:29:39 +00:00
|
|
|
|
2024-04-15 04:07:49 +00:00
|
|
|
[node name="Shape" type="CollisionShape2D" parent="."]
|
|
|
|
shape = SubResource("CircleShape2D_ide4n")
|
2024-04-14 21:29:39 +00:00
|
|
|
|
2024-04-21 21:20:02 +00:00
|
|
|
[node name="GoldSpawner" parent="." instance=ExtResource("4_d8lgm")]
|
2024-04-15 19:51:40 +00:00
|
|
|
scene = ExtResource("5_yrfoq")
|
|
|
|
|
2024-04-21 21:20:02 +00:00
|
|
|
[node name="TimerStddev" parent="GoldSpawner" instance=ExtResource("10_phvea")]
|
|
|
|
autostart = true
|
2024-04-19 01:46:21 +00:00
|
|
|
mean_secs = 5.0
|
|
|
|
deviation = 4.0
|
|
|
|
min_secs = 1.0
|
|
|
|
max_secs = 9.0
|
2024-04-15 19:51:40 +00:00
|
|
|
|
2024-04-18 23:45:43 +00:00
|
|
|
[node name="MovementSampler" parent="." node_paths=PackedStringArray("possibilities") instance=ExtResource("7_ech8d")]
|
2024-04-20 03:00:23 +00:00
|
|
|
possibilities = [NodePath("../MovementWander/WanderPriority"), NodePath("../MovementHunt/HuntPriority"), NodePath("../MovementDrag/DragPriority")]
|
2024-04-18 23:45:43 +00:00
|
|
|
|
|
|
|
[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")]
|
2024-04-18 23:52:35 +00:00
|
|
|
autostart = true
|
2024-04-18 23:45:43 +00:00
|
|
|
mean_secs = 2.0
|
|
|
|
deviation = 2.0
|
|
|
|
min_secs = 0.6
|
|
|
|
max_secs = 3.0
|
|
|
|
|
|
|
|
[node name="MovementHunt" parent="." instance=ExtResource("11_4ra22")]
|
2024-04-19 01:39:07 +00:00
|
|
|
speed = 140.0
|
2024-04-18 23:45:43 +00:00
|
|
|
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("..")
|
|
|
|
|
2024-04-20 03:00:23 +00:00
|
|
|
[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)
|
|
|
|
|
2024-04-21 23:05:21 +00:00
|
|
|
[node name="DragSound" type="AudioStreamPlayer2D" parent="MovementDrag"]
|
2024-04-21 23:21:19 +00:00
|
|
|
stream = ExtResource("16_0frai")
|
2024-04-21 23:05:21 +00:00
|
|
|
|
|
|
|
[node name="FallSound" type="AudioStreamPlayer2D" parent="MovementDrag"]
|
|
|
|
stream = ExtResource("17_lib0h")
|
|
|
|
|
2024-04-19 01:39:07 +00:00
|
|
|
[node name="Eater" parent="." instance=ExtResource("14_w2h8x")]
|
|
|
|
acceptable_diets = Array[StringName]([&"Meat"])
|
|
|
|
|
|
|
|
[node name="Shape" type="CollisionShape2D" parent="Eater"]
|
|
|
|
shape = SubResource("CircleShape2D_qhk1q")
|
|
|
|
debug_color = Color(1, 0, 0, 0)
|
|
|
|
|
2024-04-21 23:21:19 +00:00
|
|
|
[node name="EatSound" type="AudioStreamPlayer2D" parent="Eater"]
|
|
|
|
stream = ExtResource("19_7la6c")
|
|
|
|
|
2024-04-21 21:20:02 +00:00
|
|
|
[connection signal="timeout" from="GoldSpawner/TimerStddev" to="GoldSpawner" method="spawn"]
|
2024-04-18 23:45:43 +00:00
|
|
|
[connection signal="ready" from="MovementSampler" to="MovementSampler" method="enable"]
|
|
|
|
[connection signal="changed_direction" from="MovementWander" to="MovementWander/WanderPriority" method="priority_conditional"]
|
2024-04-18 23:47:34 +00:00
|
|
|
[connection signal="move" from="MovementWander" to="." method="_on_move"]
|
2024-04-18 23:45:43 +00:00
|
|
|
[connection signal="timeout" from="MovementWander/ChangeDirectionTimer" to="MovementWander" method="randomize_direction"]
|
|
|
|
[connection signal="changed_target" from="MovementHunt" to="MovementHunt/HuntPriority" method="priority_conditional"]
|
2024-04-18 23:47:34 +00:00
|
|
|
[connection signal="move" from="MovementHunt" to="." method="_on_move"]
|
2024-04-18 23:54:36 +00:00
|
|
|
[connection signal="tracked" from="MovementHunt/TrackerMeat" to="MovementHunt/TrackerMeat/TargetPicker" method="sample_target_if_null" unbinds=1]
|
2024-04-18 23:45:43 +00:00
|
|
|
[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]
|
2024-04-19 01:46:21 +00:00
|
|
|
[connection signal="target_changed" from="MovementHunt/TrackerMeat/TargetPicker" to="MovementHunt/TrackerMeat/TargetPicker" method="sample_target_if_null" unbinds=2]
|
2024-04-21 23:05:21 +00:00
|
|
|
[connection signal="dragged" from="MovementDrag" to="." method="_on_dragged"]
|
2024-04-20 03:00:23 +00:00
|
|
|
[connection signal="dragged" from="MovementDrag" to="MovementDrag/DragPriority" method="priority_alternative" unbinds=1]
|
2024-04-21 23:05:21 +00:00
|
|
|
[connection signal="dragged" from="MovementDrag" to="MovementDrag/DragSound" method="play" unbinds=1]
|
|
|
|
[connection signal="fallen" from="MovementDrag" to="." method="_on_fallen"]
|
2024-04-20 03:00:23 +00:00
|
|
|
[connection signal="fallen" from="MovementDrag" to="MovementDrag/DragPriority" method="priority_default"]
|
2024-04-21 23:05:21 +00:00
|
|
|
[connection signal="fallen" from="MovementDrag" to="MovementDrag/FallSound" method="play"]
|
2024-04-20 03:00:23 +00:00
|
|
|
[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"]
|
2024-04-19 01:39:07 +00:00
|
|
|
[connection signal="eaten" from="Eater" to="." method="_on_eater_eaten"]
|
2024-04-21 23:21:19 +00:00
|
|
|
[connection signal="eaten" from="Eater" to="Eater/EatSound" method="play" unbinds=1]
|