mirror of
https://github.com/Steffo99/hella-farm.git
synced 2024-11-24 00:54:22 +00:00
cool stuff
This commit is contained in:
parent
dc1a239471
commit
dfb6b96041
8 changed files with 145 additions and 18 deletions
|
@ -6,7 +6,7 @@ class_name Spawner
|
||||||
## Emitted when a new scene is spawned.
|
## Emitted when a new scene is spawned.
|
||||||
signal spawned(entity: Node2D)
|
signal spawned(entity: Node2D)
|
||||||
|
|
||||||
## Emitted when the [field blocking_tracker] prevents something from spawning.
|
## Emitted when a spawn fails due to the spawner being disabled.
|
||||||
signal spawn_blocked
|
signal spawn_blocked
|
||||||
|
|
||||||
|
|
||||||
|
@ -16,16 +16,21 @@ signal spawn_blocked
|
||||||
## Where the scene should be parented to in the tree.
|
## Where the scene should be parented to in the tree.
|
||||||
@export var target: Node2D
|
@export var target: Node2D
|
||||||
|
|
||||||
## If set, requires the tracker to not be tracking anything before spawning a scene.
|
## Whether calling [method spawn] does instantiate a scene.
|
||||||
@export var blocking_tracker: Tracker
|
@export var enabled: bool = true
|
||||||
|
|
||||||
|
|
||||||
|
func enable():
|
||||||
|
enabled = true
|
||||||
|
|
||||||
|
func disable():
|
||||||
|
enabled = false
|
||||||
|
|
||||||
## Spawn [field scene] at [field target] and the position of this node.
|
## Spawn [field scene] at [field target] and the position of this node.
|
||||||
func spawn():
|
func spawn():
|
||||||
if blocking_tracker != null:
|
if not enabled:
|
||||||
if not blocking_tracker.tracking.is_empty():
|
spawn_blocked.emit()
|
||||||
spawn_blocked.emit()
|
return
|
||||||
return # Perhaps enqueue the spawn?
|
|
||||||
if not target:
|
if not target:
|
||||||
target = MainGame.get_via_group(self).default_spawn_parent
|
target = MainGame.get_via_group(self).default_spawn_parent
|
||||||
if not target:
|
if not target:
|
||||||
|
@ -34,7 +39,5 @@ func spawn():
|
||||||
Log.w(self, "Not spawning, no scene is set.")
|
Log.w(self, "Not spawning, no scene is set.")
|
||||||
return
|
return
|
||||||
var entity = scene.instantiate()
|
var entity = scene.instantiate()
|
||||||
entity.global_scale = global_scale
|
|
||||||
entity.global_position = global_position
|
entity.global_position = global_position
|
||||||
entity.global_rotation = global_rotation
|
|
||||||
target.add_child.call_deferred(entity) # Not sure why this is needed.
|
target.add_child.call_deferred(entity) # Not sure why this is needed.
|
||||||
|
|
|
@ -7,6 +7,7 @@ class_name Tracker
|
||||||
|
|
||||||
signal tracked(body: Node2D)
|
signal tracked(body: Node2D)
|
||||||
signal untracked(body: Node2D)
|
signal untracked(body: Node2D)
|
||||||
|
signal empty
|
||||||
|
|
||||||
var tracking: Array = []
|
var tracking: Array = []
|
||||||
|
|
||||||
|
@ -32,6 +33,8 @@ func untrack(body: Node2D) -> bool:
|
||||||
if act:
|
if act:
|
||||||
tracking.erase(body)
|
tracking.erase(body)
|
||||||
untracked.emit(body)
|
untracked.emit(body)
|
||||||
|
if tracking.is_empty():
|
||||||
|
empty.emit()
|
||||||
# Handle TrackerTracker
|
# Handle TrackerTracker
|
||||||
for tracker_tracker in body.find_children("*", "TrackerTracker", true, false):
|
for tracker_tracker in body.find_children("*", "TrackerTracker", true, false):
|
||||||
tracker_tracker.untrack(self)
|
tracker_tracker.untrack(self)
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
[gd_scene load_steps=36 format=3 uid="uid://cmemgijh6nfmk"]
|
[gd_scene load_steps=40 format=3 uid="uid://cmemgijh6nfmk"]
|
||||||
|
|
||||||
[ext_resource type="PackedScene" uid="uid://bxbjfev0lhwws" path="res://behaviours/sprite_left_right.tscn" id="1_11voy"]
|
[ext_resource type="PackedScene" uid="uid://bxbjfev0lhwws" path="res://behaviours/sprite_left_right.tscn" id="1_11voy"]
|
||||||
[ext_resource type="Script" path="res://entities/chupacabra.gd" id="1_s4qg1"]
|
[ext_resource type="Script" path="res://entities/chupacabra.gd" id="1_s4qg1"]
|
||||||
|
@ -9,15 +9,19 @@
|
||||||
[ext_resource type="Texture2D" uid="uid://deqvgvf66grr4" path="res://entities/top_hat.png" id="5_qjgou"]
|
[ext_resource type="Texture2D" uid="uid://deqvgvf66grr4" path="res://entities/top_hat.png" id="5_qjgou"]
|
||||||
[ext_resource type="Texture2D" uid="uid://do1nfcfcs6jgx" path="res://entities/chupacabra_drag_right.png" id="6_kmadh"]
|
[ext_resource type="Texture2D" uid="uid://do1nfcfcs6jgx" path="res://entities/chupacabra_drag_right.png" id="6_kmadh"]
|
||||||
[ext_resource type="PackedScene" uid="uid://g8t6dt0ye6n3" path="res://behaviours/timer_stddev.tscn" id="6_qsds3"]
|
[ext_resource type="PackedScene" uid="uid://g8t6dt0ye6n3" path="res://behaviours/timer_stddev.tscn" id="6_qsds3"]
|
||||||
|
[ext_resource type="PackedScene" uid="uid://tx1qi6ahlxjp" path="res://behaviours/spawner.tscn" id="7_hdgjp"]
|
||||||
[ext_resource type="PackedScene" uid="uid://ccul07w0h36nu" path="res://behaviours/sacrificable.tscn" id="7_igror"]
|
[ext_resource type="PackedScene" uid="uid://ccul07w0h36nu" path="res://behaviours/sacrificable.tscn" id="7_igror"]
|
||||||
[ext_resource type="PackedScene" uid="uid://djcwis8ycrq85" path="res://behaviours/sampler_priority.tscn" id="7_nq78n"]
|
[ext_resource type="PackedScene" uid="uid://djcwis8ycrq85" path="res://behaviours/sampler_priority.tscn" id="7_nq78n"]
|
||||||
[ext_resource type="PackedScene" uid="uid://dk1ipq7dhkhf3" path="res://behaviours/move_straight.tscn" id="8_7fxrt"]
|
[ext_resource type="PackedScene" uid="uid://dk1ipq7dhkhf3" path="res://behaviours/move_straight.tscn" id="8_7fxrt"]
|
||||||
|
[ext_resource type="PackedScene" uid="uid://8ejgwtkpaa44" path="res://entities/top_hat.tscn" id="8_fa8aq"]
|
||||||
[ext_resource type="PackedScene" uid="uid://cm67ko1k6kn4u" path="res://behaviours/priority.tscn" id="9_7i81t"]
|
[ext_resource type="PackedScene" uid="uid://cm67ko1k6kn4u" path="res://behaviours/priority.tscn" id="9_7i81t"]
|
||||||
[ext_resource type="PackedScene" uid="uid://cbg5kgwxusvxf" path="res://behaviours/cursor_detector.tscn" id="10_3wu3x"]
|
[ext_resource type="PackedScene" uid="uid://cbg5kgwxusvxf" path="res://behaviours/cursor_detector.tscn" id="10_3wu3x"]
|
||||||
|
[ext_resource type="PackedScene" uid="uid://b04xhv32ypi42" path="res://entities/monocle.tscn" id="10_k033w"]
|
||||||
[ext_resource type="PackedScene" uid="uid://rx24bppccih7" path="res://behaviours/move_physics.tscn" id="12_oildi"]
|
[ext_resource type="PackedScene" uid="uid://rx24bppccih7" path="res://behaviours/move_physics.tscn" id="12_oildi"]
|
||||||
[ext_resource type="PackedScene" uid="uid://cml7rqvyfuagx" path="res://behaviours/move_towards.tscn" id="13_vh42q"]
|
[ext_resource type="PackedScene" uid="uid://cml7rqvyfuagx" path="res://behaviours/move_towards.tscn" id="13_vh42q"]
|
||||||
[ext_resource type="PackedScene" uid="uid://dijcjahkddudv" path="res://behaviours/draggable.tscn" id="13_wcydr"]
|
[ext_resource type="PackedScene" uid="uid://dijcjahkddudv" path="res://behaviours/draggable.tscn" id="13_wcydr"]
|
||||||
[ext_resource type="PackedScene" uid="uid://ctpn4hvkhxoi3" path="res://behaviours/tracker_edible.tscn" id="14_mk76g"]
|
[ext_resource type="PackedScene" uid="uid://ctpn4hvkhxoi3" path="res://behaviours/tracker_edible.tscn" id="14_mk76g"]
|
||||||
|
[ext_resource type="PackedScene" uid="uid://uoxwjpmgg27a" path="res://entities/gold.tscn" id="14_nw8pn"]
|
||||||
[ext_resource type="AudioStream" uid="uid://d0feiq5s6fnux" path="res://entities/imp_drag.wav" id="14_u2uf4"]
|
[ext_resource type="AudioStream" uid="uid://d0feiq5s6fnux" path="res://entities/imp_drag.wav" id="14_u2uf4"]
|
||||||
[ext_resource type="AudioStream" uid="uid://cwsg776c11xfc" path="res://entities/fall.ogg" id="15_q7bw3"]
|
[ext_resource type="AudioStream" uid="uid://cwsg776c11xfc" path="res://entities/fall.ogg" id="15_q7bw3"]
|
||||||
[ext_resource type="PackedScene" uid="uid://dti7l0d40hhgt" path="res://behaviours/target_picker.tscn" id="15_xay6p"]
|
[ext_resource type="PackedScene" uid="uid://dti7l0d40hhgt" path="res://behaviours/target_picker.tscn" id="15_xay6p"]
|
||||||
|
@ -392,6 +396,10 @@ texture = ExtResource("5_qjgou")
|
||||||
shape = SubResource("CircleShape2D_binyt")
|
shape = SubResource("CircleShape2D_binyt")
|
||||||
debug_color = Color(1, 0, 0, 0)
|
debug_color = Color(1, 0, 0, 0)
|
||||||
|
|
||||||
|
[node name="Spawner" parent="Sprite/TopHatter" instance=ExtResource("7_hdgjp")]
|
||||||
|
scene = ExtResource("8_fa8aq")
|
||||||
|
enabled = false
|
||||||
|
|
||||||
[node name="Monocler" parent="Sprite" instance=ExtResource("16_ltvqn")]
|
[node name="Monocler" parent="Sprite" instance=ExtResource("16_ltvqn")]
|
||||||
unique_name_in_owner = true
|
unique_name_in_owner = true
|
||||||
scale = Vector2(0.5, 0.5)
|
scale = Vector2(0.5, 0.5)
|
||||||
|
@ -409,6 +417,10 @@ texture = ExtResource("5_bcm2q")
|
||||||
shape = SubResource("CircleShape2D_binyt")
|
shape = SubResource("CircleShape2D_binyt")
|
||||||
debug_color = Color(1, 0, 0, 0)
|
debug_color = Color(1, 0, 0, 0)
|
||||||
|
|
||||||
|
[node name="Spawner" parent="Sprite/Monocler" instance=ExtResource("7_hdgjp")]
|
||||||
|
scene = ExtResource("10_k033w")
|
||||||
|
enabled = false
|
||||||
|
|
||||||
[node name="Shape" type="CollisionShape2D" parent="."]
|
[node name="Shape" type="CollisionShape2D" parent="."]
|
||||||
shape = SubResource("CircleShape2D_mnexs")
|
shape = SubResource("CircleShape2D_mnexs")
|
||||||
|
|
||||||
|
@ -425,6 +437,15 @@ next/sit = &"sit"
|
||||||
[node name="Sacrificable" parent="." instance=ExtResource("7_igror")]
|
[node name="Sacrificable" parent="." instance=ExtResource("7_igror")]
|
||||||
kind = &"Chupacabra"
|
kind = &"Chupacabra"
|
||||||
|
|
||||||
|
[node name="GoldSpawner" parent="." instance=ExtResource("7_hdgjp")]
|
||||||
|
scene = ExtResource("14_nw8pn")
|
||||||
|
|
||||||
|
[node name="SpawnTimer" parent="GoldSpawner" instance=ExtResource("6_qsds3")]
|
||||||
|
autostart = true
|
||||||
|
mean_secs = 3.0
|
||||||
|
min_secs = 0.6
|
||||||
|
max_secs = 6.0
|
||||||
|
|
||||||
[node name="MovementSampler" parent="." instance=ExtResource("7_nq78n")]
|
[node name="MovementSampler" parent="." instance=ExtResource("7_nq78n")]
|
||||||
|
|
||||||
[node name="MovementIdle" parent="." instance=ExtResource("8_7fxrt")]
|
[node name="MovementIdle" parent="." instance=ExtResource("8_7fxrt")]
|
||||||
|
@ -525,10 +546,15 @@ stream = ExtResource("17_ccla5")
|
||||||
bus = &"KillSounds"
|
bus = &"KillSounds"
|
||||||
|
|
||||||
[connection signal="eaten" from="Sprite/TopHatter" to="." method="_on_eater_eaten"]
|
[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/Sprite" method="show"]
|
||||||
|
[connection signal="tree_exiting" from="Sprite/TopHatter/Spawner" to="Sprite/TopHatter/Spawner" method="spawn"]
|
||||||
[connection signal="eaten" from="Sprite/Monocler" to="." method="_on_eater_eaten"]
|
[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/Sprite" method="show"]
|
||||||
|
[connection signal="tree_exiting" from="Sprite/Monocler/Spawner" to="Sprite/Monocler/Spawner" method="spawn"]
|
||||||
[connection signal="sacrificed" from="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="MovementIdle" to="." method="_on_move"]
|
[connection signal="move" from="MovementIdle" to="." method="_on_move"]
|
||||||
[connection signal="move_disabled" from="MovementIdle" to="MovementIdle/BoredTimer" method="stop"]
|
[connection signal="move_disabled" from="MovementIdle" to="MovementIdle/BoredTimer" method="stop"]
|
||||||
[connection signal="move_enabled" from="MovementIdle" to="MovementIdle/BoredTimer" method="start"]
|
[connection signal="move_enabled" from="MovementIdle" to="MovementIdle/BoredTimer" method="start"]
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
[gd_scene load_steps=23 format=3 uid="uid://gl4umoff474y"]
|
[gd_scene load_steps=26 format=3 uid="uid://gl4umoff474y"]
|
||||||
|
|
||||||
[ext_resource type="PackedScene" uid="uid://bxbjfev0lhwws" path="res://behaviours/sprite_left_right.tscn" id="1_a8ato"]
|
[ext_resource type="PackedScene" uid="uid://bxbjfev0lhwws" path="res://behaviours/sprite_left_right.tscn" id="1_a8ato"]
|
||||||
[ext_resource type="Script" path="res://entities/cthulhu.gd" id="1_b55wc"]
|
[ext_resource type="Script" path="res://entities/cthulhu.gd" id="1_b55wc"]
|
||||||
|
@ -9,9 +9,12 @@
|
||||||
[ext_resource type="Texture2D" uid="uid://d3tb6ypb36v8e" path="res://entities/monocle.png" id="6_04snb"]
|
[ext_resource type="Texture2D" uid="uid://d3tb6ypb36v8e" path="res://entities/monocle.png" id="6_04snb"]
|
||||||
[ext_resource type="Texture2D" uid="uid://b0tlt1tgukajd" path="res://entities/cthulhu_drag_right.png" id="6_behik"]
|
[ext_resource type="Texture2D" uid="uid://b0tlt1tgukajd" path="res://entities/cthulhu_drag_right.png" id="6_behik"]
|
||||||
[ext_resource type="PackedScene" uid="uid://djcwis8ycrq85" path="res://behaviours/sampler_priority.tscn" id="6_truco"]
|
[ext_resource type="PackedScene" uid="uid://djcwis8ycrq85" path="res://behaviours/sampler_priority.tscn" id="6_truco"]
|
||||||
|
[ext_resource type="PackedScene" uid="uid://tx1qi6ahlxjp" path="res://behaviours/spawner.tscn" id="7_op2gq"]
|
||||||
|
[ext_resource type="PackedScene" uid="uid://8ejgwtkpaa44" path="res://entities/top_hat.tscn" id="8_essd3"]
|
||||||
[ext_resource type="PackedScene" uid="uid://rx24bppccih7" path="res://behaviours/move_physics.tscn" id="8_mvkr6"]
|
[ext_resource type="PackedScene" uid="uid://rx24bppccih7" path="res://behaviours/move_physics.tscn" id="8_mvkr6"]
|
||||||
[ext_resource type="PackedScene" uid="uid://cm67ko1k6kn4u" path="res://behaviours/priority.tscn" id="9_7b55p"]
|
[ext_resource type="PackedScene" uid="uid://cm67ko1k6kn4u" path="res://behaviours/priority.tscn" id="9_7b55p"]
|
||||||
[ext_resource type="PackedScene" uid="uid://dijcjahkddudv" path="res://behaviours/draggable.tscn" id="10_c36ur"]
|
[ext_resource type="PackedScene" uid="uid://dijcjahkddudv" path="res://behaviours/draggable.tscn" id="10_c36ur"]
|
||||||
|
[ext_resource type="PackedScene" uid="uid://b04xhv32ypi42" path="res://entities/monocle.tscn" id="10_dmlhw"]
|
||||||
[ext_resource type="AudioStream" uid="uid://d0feiq5s6fnux" path="res://entities/imp_drag.wav" id="11_jt7u1"]
|
[ext_resource type="AudioStream" uid="uid://d0feiq5s6fnux" path="res://entities/imp_drag.wav" id="11_jt7u1"]
|
||||||
[ext_resource type="AudioStream" uid="uid://cwsg776c11xfc" path="res://entities/fall.ogg" id="12_v8da5"]
|
[ext_resource type="AudioStream" uid="uid://cwsg776c11xfc" path="res://entities/fall.ogg" id="12_v8da5"]
|
||||||
[ext_resource type="PackedScene" uid="uid://jg7qkbswgqjc" path="res://behaviours/eater.tscn" id="15_vopba"]
|
[ext_resource type="PackedScene" uid="uid://jg7qkbswgqjc" path="res://behaviours/eater.tscn" id="15_vopba"]
|
||||||
|
@ -224,6 +227,10 @@ texture = ExtResource("5_a1p2d")
|
||||||
shape = SubResource("CircleShape2D_wjkbi")
|
shape = SubResource("CircleShape2D_wjkbi")
|
||||||
debug_color = Color(1, 0, 0, 0)
|
debug_color = Color(1, 0, 0, 0)
|
||||||
|
|
||||||
|
[node name="Spawner" parent="SpriteFocus/Sprite/TopHatter" instance=ExtResource("7_op2gq")]
|
||||||
|
scene = ExtResource("8_essd3")
|
||||||
|
enabled = false
|
||||||
|
|
||||||
[node name="Monocler" parent="SpriteFocus/Sprite" instance=ExtResource("15_vopba")]
|
[node name="Monocler" parent="SpriteFocus/Sprite" instance=ExtResource("15_vopba")]
|
||||||
unique_name_in_owner = true
|
unique_name_in_owner = true
|
||||||
position = Vector2(0, -6)
|
position = Vector2(0, -6)
|
||||||
|
@ -242,6 +249,10 @@ texture = ExtResource("6_04snb")
|
||||||
shape = SubResource("CircleShape2D_wjkbi")
|
shape = SubResource("CircleShape2D_wjkbi")
|
||||||
debug_color = Color(1, 0, 0, 0)
|
debug_color = Color(1, 0, 0, 0)
|
||||||
|
|
||||||
|
[node name="Spawner" parent="SpriteFocus/Sprite/Monocler" instance=ExtResource("7_op2gq")]
|
||||||
|
scene = ExtResource("10_dmlhw")
|
||||||
|
enabled = false
|
||||||
|
|
||||||
[node name="Shape" type="CollisionShape2D" parent="."]
|
[node name="Shape" type="CollisionShape2D" parent="."]
|
||||||
position = Vector2(0, 36)
|
position = Vector2(0, 36)
|
||||||
shape = SubResource("CircleShape2D_uw0y6")
|
shape = SubResource("CircleShape2D_uw0y6")
|
||||||
|
@ -280,9 +291,13 @@ stream = ExtResource("12_v8da5")
|
||||||
bus = &"FallSounds"
|
bus = &"FallSounds"
|
||||||
|
|
||||||
[connection signal="eaten" from="SpriteFocus/Sprite/TopHatter" to="." method="_on_eater_eaten"]
|
[connection signal="eaten" from="SpriteFocus/Sprite/TopHatter" to="." method="_on_eater_eaten"]
|
||||||
|
[connection signal="eaten" from="SpriteFocus/Sprite/TopHatter" to="SpriteFocus/Sprite/TopHatter/Spawner" method="enable" unbinds=1]
|
||||||
[connection signal="goal_reached" from="SpriteFocus/Sprite/TopHatter" to="SpriteFocus/Sprite/TopHatter/Sprite" method="show"]
|
[connection signal="goal_reached" from="SpriteFocus/Sprite/TopHatter" to="SpriteFocus/Sprite/TopHatter/Sprite" method="show"]
|
||||||
|
[connection signal="tree_exiting" from="SpriteFocus/Sprite/TopHatter/Spawner" to="SpriteFocus/Sprite/TopHatter/Spawner" method="spawn"]
|
||||||
[connection signal="eaten" from="SpriteFocus/Sprite/Monocler" to="." method="_on_eater_eaten"]
|
[connection signal="eaten" from="SpriteFocus/Sprite/Monocler" to="." method="_on_eater_eaten"]
|
||||||
|
[connection signal="eaten" from="SpriteFocus/Sprite/Monocler" to="SpriteFocus/Sprite/Monocler/Spawner" method="enable" unbinds=1]
|
||||||
[connection signal="goal_reached" from="SpriteFocus/Sprite/Monocler" to="SpriteFocus/Sprite/Monocler/Sprite" method="show"]
|
[connection signal="goal_reached" from="SpriteFocus/Sprite/Monocler" to="SpriteFocus/Sprite/Monocler/Sprite" method="show"]
|
||||||
|
[connection signal="tree_exiting" from="SpriteFocus/Sprite/Monocler/Spawner" to="SpriteFocus/Sprite/Monocler/Spawner" method="spawn"]
|
||||||
[connection signal="dragged" from="MovementDrag" to="." method="_on_dragged"]
|
[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/DragPriority" method="priority_alternative" unbinds=1]
|
||||||
[connection signal="dragged" from="MovementDrag" to="MovementDrag/DragSound" method="play" unbinds=1]
|
[connection signal="dragged" from="MovementDrag" to="MovementDrag/DragSound" method="play" unbinds=1]
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
[gd_scene load_steps=35 format=3 uid="uid://4d3ksr3171x4"]
|
[gd_scene load_steps=37 format=3 uid="uid://4d3ksr3171x4"]
|
||||||
|
|
||||||
[ext_resource type="Script" path="res://entities/imp.gd" id="1_dixpc"]
|
[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="PackedScene" uid="uid://bxbjfev0lhwws" path="res://behaviours/sprite_left_right.tscn" id="2_eqcdi"]
|
||||||
|
@ -13,7 +13,9 @@
|
||||||
[ext_resource type="PackedScene" uid="uid://djcwis8ycrq85" path="res://behaviours/sampler_priority.tscn" id="7_ech8d"]
|
[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://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://dk1ipq7dhkhf3" path="res://behaviours/move_straight.tscn" id="8_ffcw0"]
|
||||||
|
[ext_resource type="PackedScene" uid="uid://8ejgwtkpaa44" path="res://entities/top_hat.tscn" id="8_m3as1"]
|
||||||
[ext_resource type="PackedScene" uid="uid://cm67ko1k6kn4u" path="res://behaviours/priority.tscn" id="9_2wb1b"]
|
[ext_resource type="PackedScene" uid="uid://cm67ko1k6kn4u" path="res://behaviours/priority.tscn" id="9_2wb1b"]
|
||||||
|
[ext_resource type="PackedScene" uid="uid://b04xhv32ypi42" path="res://entities/monocle.tscn" id="10_gikey"]
|
||||||
[ext_resource type="PackedScene" uid="uid://g8t6dt0ye6n3" path="res://behaviours/timer_stddev.tscn" id="10_phvea"]
|
[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://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://ctpn4hvkhxoi3" path="res://behaviours/tracker_edible.tscn" id="12_dr2oe"]
|
||||||
|
@ -261,6 +263,10 @@ texture = ExtResource("5_w4u6a")
|
||||||
shape = SubResource("CircleShape2D_6l0s5")
|
shape = SubResource("CircleShape2D_6l0s5")
|
||||||
debug_color = Color(1, 0, 0, 0)
|
debug_color = Color(1, 0, 0, 0)
|
||||||
|
|
||||||
|
[node name="Spawner" parent="Sprite/TopHatter" instance=ExtResource("4_d8lgm")]
|
||||||
|
scene = ExtResource("8_m3as1")
|
||||||
|
enabled = false
|
||||||
|
|
||||||
[node name="Monocler" parent="Sprite" instance=ExtResource("14_w2h8x")]
|
[node name="Monocler" parent="Sprite" instance=ExtResource("14_w2h8x")]
|
||||||
unique_name_in_owner = true
|
unique_name_in_owner = true
|
||||||
scale = Vector2(0.5, 0.5)
|
scale = Vector2(0.5, 0.5)
|
||||||
|
@ -278,6 +284,10 @@ texture = ExtResource("6_jebbv")
|
||||||
shape = SubResource("CircleShape2D_6l0s5")
|
shape = SubResource("CircleShape2D_6l0s5")
|
||||||
debug_color = Color(1, 0, 0, 0)
|
debug_color = Color(1, 0, 0, 0)
|
||||||
|
|
||||||
|
[node name="Spawner" parent="Sprite/Monocler" instance=ExtResource("4_d8lgm")]
|
||||||
|
scene = ExtResource("10_gikey")
|
||||||
|
enabled = false
|
||||||
|
|
||||||
[node name="Shape" type="CollisionShape2D" parent="."]
|
[node name="Shape" type="CollisionShape2D" parent="."]
|
||||||
shape = SubResource("CircleShape2D_ide4n")
|
shape = SubResource("CircleShape2D_ide4n")
|
||||||
|
|
||||||
|
@ -298,7 +308,6 @@ scene = ExtResource("5_yrfoq")
|
||||||
[node name="SpawnTimer" parent="GoldSpawner" instance=ExtResource("10_phvea")]
|
[node name="SpawnTimer" parent="GoldSpawner" instance=ExtResource("10_phvea")]
|
||||||
autostart = true
|
autostart = true
|
||||||
mean_secs = 5.0
|
mean_secs = 5.0
|
||||||
deviation = 4.0
|
|
||||||
min_secs = 1.0
|
min_secs = 1.0
|
||||||
max_secs = 9.0
|
max_secs = 9.0
|
||||||
|
|
||||||
|
@ -388,9 +397,13 @@ stream = ExtResource("19_7la6c")
|
||||||
bus = &"KillSounds"
|
bus = &"KillSounds"
|
||||||
|
|
||||||
[connection signal="eaten" from="Sprite/TopHatter" to="." method="_on_eater_eaten"]
|
[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/Sprite" method="show"]
|
||||||
|
[connection signal="tree_exiting" from="Sprite/TopHatter/Spawner" to="Sprite/TopHatter/Spawner" method="spawn"]
|
||||||
[connection signal="eaten" from="Sprite/Monocler" to="." method="_on_eater_eaten"]
|
[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/Sprite" method="show"]
|
||||||
|
[connection signal="tree_exiting" from="Sprite/Monocler/Spawner" to="Sprite/Monocler/Spawner" method="spawn"]
|
||||||
[connection signal="sacrificed" from="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="timeout" from="GoldSpawner/SpawnTimer" to="GoldSpawner" method="spawn"]
|
||||||
[connection signal="changed_direction" from="MovementWander" to="MovementWander/WanderPriority" method="priority_conditional"]
|
[connection signal="changed_direction" from="MovementWander" to="MovementWander/WanderPriority" method="priority_conditional"]
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
[gd_scene load_steps=34 format=3 uid="uid://bc2bm8lbol18w"]
|
[gd_scene load_steps=37 format=3 uid="uid://bc2bm8lbol18w"]
|
||||||
|
|
||||||
[ext_resource type="Script" path="res://entities/sheep.gd" id="1_4dmll"]
|
[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="Texture2D" uid="uid://iljp5yn3ehfk" path="res://entities/sheep_left.png" id="2_t13f5"]
|
||||||
|
@ -9,9 +9,12 @@
|
||||||
[ext_resource type="PackedScene" uid="uid://dfdr3e32lohq" path="res://behaviours/edible.tscn" id="6_3odsh"]
|
[ext_resource type="PackedScene" uid="uid://dfdr3e32lohq" path="res://behaviours/edible.tscn" id="6_3odsh"]
|
||||||
[ext_resource type="Texture2D" uid="uid://d3tb6ypb36v8e" path="res://entities/monocle.png" id="6_q0o52"]
|
[ext_resource type="Texture2D" uid="uid://d3tb6ypb36v8e" path="res://entities/monocle.png" id="6_q0o52"]
|
||||||
[ext_resource type="Texture2D" uid="uid://m5bebwb06kqe" path="res://entities/sheep_drag_right.png" id="6_x4fsj"]
|
[ext_resource type="Texture2D" uid="uid://m5bebwb06kqe" path="res://entities/sheep_drag_right.png" id="6_x4fsj"]
|
||||||
|
[ext_resource type="PackedScene" uid="uid://tx1qi6ahlxjp" path="res://behaviours/spawner.tscn" id="7_5is0u"]
|
||||||
[ext_resource type="PackedScene" uid="uid://ccul07w0h36nu" path="res://behaviours/sacrificable.tscn" id="8_43m1b"]
|
[ext_resource type="PackedScene" uid="uid://ccul07w0h36nu" path="res://behaviours/sacrificable.tscn" id="8_43m1b"]
|
||||||
|
[ext_resource type="PackedScene" uid="uid://8ejgwtkpaa44" path="res://entities/top_hat.tscn" id="8_d32x5"]
|
||||||
[ext_resource type="PackedScene" uid="uid://djcwis8ycrq85" path="res://behaviours/sampler_priority.tscn" id="9_s5lod"]
|
[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://dk1ipq7dhkhf3" path="res://behaviours/move_straight.tscn" id="10_05kcd"]
|
||||||
|
[ext_resource type="PackedScene" uid="uid://b04xhv32ypi42" path="res://entities/monocle.tscn" id="10_dmfsp"]
|
||||||
[ext_resource type="PackedScene" uid="uid://cm67ko1k6kn4u" path="res://behaviours/priority.tscn" id="11_0jlmk"]
|
[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://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://cml7rqvyfuagx" path="res://behaviours/move_towards.tscn" id="12_x2g3x"]
|
||||||
|
@ -238,6 +241,10 @@ texture = ExtResource("5_gfn7a")
|
||||||
shape = SubResource("CircleShape2D_kq6qs")
|
shape = SubResource("CircleShape2D_kq6qs")
|
||||||
debug_color = Color(1, 0, 0, 0)
|
debug_color = Color(1, 0, 0, 0)
|
||||||
|
|
||||||
|
[node name="Spawner" parent="Sprite/TopHatter" instance=ExtResource("7_5is0u")]
|
||||||
|
scene = ExtResource("8_d32x5")
|
||||||
|
enabled = false
|
||||||
|
|
||||||
[node name="Monocler" parent="Sprite" instance=ExtResource("22_lilpq")]
|
[node name="Monocler" parent="Sprite" instance=ExtResource("22_lilpq")]
|
||||||
unique_name_in_owner = true
|
unique_name_in_owner = true
|
||||||
position = Vector2(0, 2)
|
position = Vector2(0, 2)
|
||||||
|
@ -256,6 +263,10 @@ texture = ExtResource("6_q0o52")
|
||||||
shape = SubResource("CircleShape2D_kq6qs")
|
shape = SubResource("CircleShape2D_kq6qs")
|
||||||
debug_color = Color(1, 0, 0, 0)
|
debug_color = Color(1, 0, 0, 0)
|
||||||
|
|
||||||
|
[node name="Spawner" parent="Sprite/Monocler" instance=ExtResource("7_5is0u")]
|
||||||
|
scene = ExtResource("10_dmfsp")
|
||||||
|
enabled = false
|
||||||
|
|
||||||
[node name="Shape" type="CollisionShape2D" parent="."]
|
[node name="Shape" type="CollisionShape2D" parent="."]
|
||||||
shape = SubResource("CircleShape2D_c5tcn")
|
shape = SubResource("CircleShape2D_c5tcn")
|
||||||
|
|
||||||
|
@ -372,9 +383,13 @@ stream = ExtResource("17_8kst2")
|
||||||
bus = &"FallSounds"
|
bus = &"FallSounds"
|
||||||
|
|
||||||
[connection signal="eaten" from="Sprite/TopHatter" to="." method="_on_eater_eaten"]
|
[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/Sprite" method="show"]
|
||||||
|
[connection signal="tree_exiting" from="Sprite/TopHatter/Spawner" to="Sprite/TopHatter/Spawner" method="spawn"]
|
||||||
[connection signal="eaten" from="Sprite/Monocler" to="." method="_on_eater_eaten"]
|
[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/Sprite" method="show"]
|
||||||
|
[connection signal="tree_exiting" from="Sprite/Monocler/Spawner" to="Sprite/Monocler/Spawner" method="spawn"]
|
||||||
[connection signal="sacrificed" from="Sacrificable" to="." method="queue_free"]
|
[connection signal="sacrificed" from="Sacrificable" to="." method="queue_free"]
|
||||||
[connection signal="move" from="MovementIdle" to="." method="_on_move"]
|
[connection signal="move" from="MovementIdle" to="." method="_on_move"]
|
||||||
[connection signal="move_disabled" from="MovementIdle" to="MovementIdle/BoredTimer" method="stop"]
|
[connection signal="move_disabled" from="MovementIdle" to="MovementIdle/BoredTimer" method="stop"]
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
[gd_scene load_steps=33 format=3 uid="uid://dnjtduk0hla3f"]
|
[gd_scene load_steps=38 format=3 uid="uid://dnjtduk0hla3f"]
|
||||||
|
|
||||||
[ext_resource type="Script" path="res://entities/watcher.gd" id="1_brahc"]
|
[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="PackedScene" uid="uid://bxbjfev0lhwws" path="res://behaviours/sprite_left_right.tscn" id="1_thu73"]
|
||||||
|
@ -8,15 +8,19 @@
|
||||||
[ext_resource type="Texture2D" uid="uid://deqvgvf66grr4" path="res://entities/top_hat.png" id="5_axhwx"]
|
[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://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="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://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="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://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://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://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://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="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://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="AudioStream" uid="uid://cwsg776c11xfc" path="res://entities/fall.ogg" id="12_0h21e"]
|
||||||
|
[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://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://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://dti7l0d40hhgt" path="res://behaviours/target_picker.tscn" id="16_ch04y"]
|
||||||
|
@ -149,11 +153,29 @@ tracks/2/keys = {
|
||||||
"values": [ExtResource("8_5nq2n")]
|
"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)]
|
||||||
|
}
|
||||||
|
|
||||||
[sub_resource type="AnimationLibrary" id="AnimationLibrary_yam4u"]
|
[sub_resource type="AnimationLibrary" id="AnimationLibrary_yam4u"]
|
||||||
_data = {
|
_data = {
|
||||||
"RESET": SubResource("Animation_gokbg"),
|
"RESET": SubResource("Animation_gokbg"),
|
||||||
"drag_loop": SubResource("Animation_5yt72"),
|
"drag_loop": SubResource("Animation_5yt72"),
|
||||||
"drag_start": SubResource("Animation_2igbw")
|
"drag_start": SubResource("Animation_2igbw"),
|
||||||
|
"fly": SubResource("Animation_lrqld")
|
||||||
}
|
}
|
||||||
|
|
||||||
[sub_resource type="CircleShape2D" id="CircleShape2D_a0gfn"]
|
[sub_resource type="CircleShape2D" id="CircleShape2D_a0gfn"]
|
||||||
|
@ -176,6 +198,7 @@ script = ExtResource("1_brahc")
|
||||||
|
|
||||||
[node name="Sprite" parent="." instance=ExtResource("1_thu73")]
|
[node name="Sprite" parent="." instance=ExtResource("1_thu73")]
|
||||||
unique_name_in_owner = true
|
unique_name_in_owner = true
|
||||||
|
position = Vector2(0, -3.044)
|
||||||
scale = Vector2(2, 2)
|
scale = Vector2(2, 2)
|
||||||
texture = ExtResource("2_32yw7")
|
texture = ExtResource("2_32yw7")
|
||||||
left_texture = ExtResource("2_32yw7")
|
left_texture = ExtResource("2_32yw7")
|
||||||
|
@ -184,6 +207,7 @@ right_texture = ExtResource("3_k8fgk")
|
||||||
[node name="TopHatter" parent="Sprite" instance=ExtResource("19_ktenf")]
|
[node name="TopHatter" parent="Sprite" instance=ExtResource("19_ktenf")]
|
||||||
unique_name_in_owner = true
|
unique_name_in_owner = true
|
||||||
scale = Vector2(0.5, 0.5)
|
scale = Vector2(0.5, 0.5)
|
||||||
|
collision_mask = 16
|
||||||
acceptable_diets = Array[StringName]([&"TopHat"])
|
acceptable_diets = Array[StringName]([&"TopHat"])
|
||||||
target = 1
|
target = 1
|
||||||
|
|
||||||
|
@ -198,9 +222,14 @@ texture = ExtResource("5_axhwx")
|
||||||
shape = SubResource("CircleShape2D_x5uuo")
|
shape = SubResource("CircleShape2D_x5uuo")
|
||||||
debug_color = Color(1, 0, 0, 0)
|
debug_color = Color(1, 0, 0, 0)
|
||||||
|
|
||||||
|
[node name="Spawner" parent="Sprite/TopHatter" instance=ExtResource("7_kaba2")]
|
||||||
|
scene = ExtResource("8_4xe4s")
|
||||||
|
enabled = false
|
||||||
|
|
||||||
[node name="Monocler" parent="Sprite" instance=ExtResource("19_ktenf")]
|
[node name="Monocler" parent="Sprite" instance=ExtResource("19_ktenf")]
|
||||||
unique_name_in_owner = true
|
unique_name_in_owner = true
|
||||||
scale = Vector2(0.5, 0.5)
|
scale = Vector2(0.5, 0.5)
|
||||||
|
collision_mask = 16
|
||||||
acceptable_diets = Array[StringName]([&"Monocle"])
|
acceptable_diets = Array[StringName]([&"Monocle"])
|
||||||
target = 1
|
target = 1
|
||||||
|
|
||||||
|
@ -215,6 +244,10 @@ texture = ExtResource("6_owihj")
|
||||||
shape = SubResource("CircleShape2D_x5uuo")
|
shape = SubResource("CircleShape2D_x5uuo")
|
||||||
debug_color = Color(1, 0, 0, 0)
|
debug_color = Color(1, 0, 0, 0)
|
||||||
|
|
||||||
|
[node name="Spawner" parent="Sprite/Monocler" instance=ExtResource("7_kaba2")]
|
||||||
|
scene = ExtResource("10_wf4xh")
|
||||||
|
enabled = false
|
||||||
|
|
||||||
[node name="Shape" type="CollisionShape2D" parent="."]
|
[node name="Shape" type="CollisionShape2D" parent="."]
|
||||||
shape = SubResource("CircleShape2D_diig7")
|
shape = SubResource("CircleShape2D_diig7")
|
||||||
|
|
||||||
|
@ -229,6 +262,15 @@ next/drag_start = &"drag_loop"
|
||||||
[node name="Sacrificable" parent="." instance=ExtResource("7_lxtqq")]
|
[node name="Sacrificable" parent="." instance=ExtResource("7_lxtqq")]
|
||||||
kind = &"Watcher"
|
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 = 1.2
|
||||||
|
min_secs = 2.4
|
||||||
|
max_secs = 0.4
|
||||||
|
|
||||||
[node name="MovementSampler" parent="." instance=ExtResource("4_i1htf")]
|
[node name="MovementSampler" parent="." instance=ExtResource("4_i1htf")]
|
||||||
|
|
||||||
[node name="MovementTilt" parent="." instance=ExtResource("9_xig8d")]
|
[node name="MovementTilt" parent="." instance=ExtResource("9_xig8d")]
|
||||||
|
@ -318,11 +360,17 @@ stream = ExtResource("20_bdcer")
|
||||||
bus = &"KillSounds"
|
bus = &"KillSounds"
|
||||||
|
|
||||||
[connection signal="eaten" from="Sprite/TopHatter" to="." method="_on_eater_eaten"]
|
[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/Sprite" method="show"]
|
||||||
|
[connection signal="tree_exiting" from="Sprite/TopHatter/Spawner" to="Sprite/TopHatter/Spawner" method="spawn"]
|
||||||
[connection signal="eaten" from="Sprite/Monocler" to="." method="_on_eater_eaten"]
|
[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/Sprite" method="show"]
|
||||||
|
[connection signal="tree_exiting" from="Sprite/Monocler/Spawner" to="Sprite/Monocler/Spawner" method="spawn"]
|
||||||
[connection signal="sacrificed" from="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" 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_direction"]
|
[connection signal="ready" from="MovementTilt" to="MovementTilt" method="randomize_direction"]
|
||||||
[connection signal="ready" from="MovementTilt" to="MovementTilt" method="randomize_rotation_speed"]
|
[connection signal="ready" from="MovementTilt" to="MovementTilt" method="randomize_rotation_speed"]
|
||||||
[connection signal="timeout" from="MovementTilt/TimerStddev" to="MovementTilt" method="randomize_rotation_speed"]
|
[connection signal="timeout" from="MovementTilt/TimerStddev" to="MovementTilt" method="randomize_rotation_speed"]
|
||||||
|
@ -330,6 +378,7 @@ bus = &"KillSounds"
|
||||||
[connection signal="move" from="MovementTrap" to="." method="_on_move"]
|
[connection signal="move" from="MovementTrap" to="." method="_on_move"]
|
||||||
[connection signal="move_disabled" from="MovementTrap" to="." method="_on_freed"]
|
[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="." 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_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="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="tracked" from="MovementTrap/TrackerTrap" to="MovementTrap/TrackerTrap/TargetPicker" method="sample_target_if_null" unbinds=1]
|
||||||
|
@ -338,6 +387,7 @@ bus = &"KillSounds"
|
||||||
[connection signal="target_changed" from="MovementTrap/TrackerTrap/TargetPicker" to="MovementTrap/TrackerTrap/TargetPicker" method="sample_target_if_null" unbinds=2]
|
[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="changed_target" from="MovementHunt" to="MovementHunt/HuntPriority" method="priority_conditional"]
|
||||||
[connection signal="move" from="MovementHunt" to="." method="_on_move"]
|
[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="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="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" method="set_target" unbinds=1]
|
||||||
|
|
|
@ -25,13 +25,15 @@ debug_color = Color(0, 0.411765, 0, 0)
|
||||||
[node name="GoldDisplay" parent="." instance=ExtResource("2_5c4iq")]
|
[node name="GoldDisplay" parent="." instance=ExtResource("2_5c4iq")]
|
||||||
unique_name_in_owner = true
|
unique_name_in_owner = true
|
||||||
|
|
||||||
[node name="SheepSpawner" type="Node2D" parent="." node_paths=PackedStringArray("blocking_tracker")]
|
[node name="SheepSpawner" type="Node2D" parent="."]
|
||||||
unique_name_in_owner = true
|
unique_name_in_owner = true
|
||||||
script = ExtResource("3_tutfd")
|
script = ExtResource("3_tutfd")
|
||||||
scene = ExtResource("4_7isfg")
|
scene = ExtResource("4_7isfg")
|
||||||
blocking_tracker = NodePath("Tracker")
|
|
||||||
|
|
||||||
[node name="Tracker" parent="SheepSpawner" instance=ExtResource("5_ewy4o")]
|
[node name="Tracker" parent="SheepSpawner" instance=ExtResource("5_ewy4o")]
|
||||||
|
|
||||||
[node name="Shape" type="CollisionShape2D" parent="SheepSpawner/Tracker"]
|
[node name="Shape" type="CollisionShape2D" parent="SheepSpawner/Tracker"]
|
||||||
shape = SubResource("CircleShape2D_dc2ul")
|
shape = SubResource("CircleShape2D_dc2ul")
|
||||||
|
|
||||||
|
[connection signal="empty" from="SheepSpawner/Tracker" to="SheepSpawner" method="enable"]
|
||||||
|
[connection signal="tracked" from="SheepSpawner/Tracker" to="SheepSpawner" method="disable" unbinds=1]
|
||||||
|
|
Loading…
Reference in a new issue