mirror of
https://github.com/Steffo99/hella-farm.git
synced 2024-11-24 17:14:23 +00:00
bfbnsdfngjdsfngj
This commit is contained in:
parent
98a457262c
commit
fe402419cb
18 changed files with 280 additions and 110 deletions
|
@ -22,6 +22,12 @@ var count: int = 0
|
|||
func log_eaten(edible: Edible) -> void:
|
||||
Log.p(self, "Eaten: %s" % edible)
|
||||
|
||||
func plus_one():
|
||||
count += 1
|
||||
if count == target:
|
||||
goal_reached.emit()
|
||||
|
||||
|
||||
|
||||
func _on_body_entered(body: Node2D) -> void:
|
||||
var edibles: Array = body.find_children("Edible", "Edible", false, false)
|
||||
|
@ -29,6 +35,4 @@ func _on_body_entered(body: Node2D) -> void:
|
|||
if edible.diet in acceptable_diets:
|
||||
eaten.emit(edible)
|
||||
edible.eat()
|
||||
count += 1
|
||||
if count == target:
|
||||
goal_reached.emit()
|
||||
plus_one()
|
||||
|
|
|
@ -13,5 +13,8 @@ signal sacrificed
|
|||
@export var kind: StringName = &""
|
||||
|
||||
|
||||
func set_kind(value: StringName) -> void:
|
||||
kind = value
|
||||
|
||||
func sacrifice():
|
||||
sacrificed.emit()
|
||||
|
|
|
@ -43,3 +43,7 @@ func spawn():
|
|||
target.add_child.call_deferred(entity) # Not sure why this is needed.
|
||||
spawned.emit(entity)
|
||||
return entity
|
||||
|
||||
func roll_spawn(odds: int):
|
||||
if Random.rng.randi_range(0, odds - 1) == 0:
|
||||
spawn()
|
||||
|
|
|
@ -62,11 +62,15 @@ func _on_sacrifice_changed(_entity: Node2D) -> void:
|
|||
entities.assign(
|
||||
stones.map(func(stone): return stone.entity)
|
||||
)
|
||||
for stone in stones:
|
||||
if stone.entity == null:
|
||||
return
|
||||
for recipe in recipes:
|
||||
if recipe.do_match(entities):
|
||||
break
|
||||
|
||||
func _on_recipe_matched(m: SummoningRecipe.Match, recipe: SummoningRecipe) -> void:
|
||||
recipe_matched.emit(m, recipe)
|
||||
for sacrificable in m.sacrificables:
|
||||
sacrificable.sacrifice()
|
||||
for stone in stones:
|
||||
for sacrificable in stone.entity.find_children("*", "Sacrificable", true, false):
|
||||
sacrificable.sacrifice()
|
||||
|
|
|
@ -21,6 +21,8 @@ func _on_roof_input(_viewport: Node, event: InputEvent, _shape_idx: int) -> void
|
|||
return
|
||||
if not event.pressed:
|
||||
return
|
||||
if animator.is_playing():
|
||||
return
|
||||
gold_counter.decrease(5)
|
||||
animator.play(&"coin")
|
||||
|
||||
|
@ -31,3 +33,8 @@ func _on_animation_finished(anim_name:StringName) -> void:
|
|||
func _on_sheep_spawned(entity: Node2D) -> void:
|
||||
Log.p(self, "%s" % entity)
|
||||
entity.get_node("MovementBarn/BarnPriority").priority_alternative()
|
||||
animator.speed_scale += 0.04
|
||||
if Random.rng.randi_range(0, 20) == 0:
|
||||
entity.get_node("Sprite/TopHatter").plus_one()
|
||||
if Random.rng.randi_range(0, 20) == 0:
|
||||
entity.get_node("Sprite/Monocler").plus_one()
|
|
@ -358,7 +358,7 @@ size = Vector2(11, 62)
|
|||
size = Vector2(140, 38)
|
||||
|
||||
[sub_resource type="RectangleShape2D" id="RectangleShape2D_0ike4"]
|
||||
size = Vector2(121, 62)
|
||||
size = Vector2(73, 62)
|
||||
|
||||
[node name="Barn" type="StaticBody2D"]
|
||||
collision_layer = 88
|
||||
|
@ -366,6 +366,7 @@ collision_mask = 4
|
|||
script = ExtResource("1_ny8oq")
|
||||
|
||||
[node name="BarnWallFront" type="Sprite2D" parent="."]
|
||||
z_index = 2
|
||||
position = Vector2(8, -58)
|
||||
scale = Vector2(2, 2)
|
||||
texture = ExtResource("1_4a825")
|
||||
|
@ -377,6 +378,7 @@ scale = Vector2(2, 2)
|
|||
texture = ExtResource("2_86ic0")
|
||||
|
||||
[node name="BarnRoofFront" type="Sprite2D" parent="."]
|
||||
z_index = 2
|
||||
position = Vector2(8, -58)
|
||||
scale = Vector2(2, 2)
|
||||
texture = ExtResource("3_l2mr8")
|
||||
|
@ -474,7 +476,7 @@ debug_color = Color(0.584314, 0.380392, 1, 0.243137)
|
|||
unique_name_in_owner = true
|
||||
|
||||
[node name="Shape" type="CollisionShape2D" parent="BlockedTracker"]
|
||||
position = Vector2(26.5, -31)
|
||||
position = Vector2(50.5, -31)
|
||||
shape = SubResource("RectangleShape2D_0ike4")
|
||||
debug_color = Color(0.733333, 0.447059, 0.411765, 0.419608)
|
||||
|
||||
|
|
|
@ -401,6 +401,8 @@ debug_color = Color(1, 0, 0, 0)
|
|||
scene = ExtResource("8_fa8aq")
|
||||
enabled = false
|
||||
|
||||
[node name="Sacrificable" parent="Sprite/TopHatter" instance=ExtResource("7_igror")]
|
||||
|
||||
[node name="Monocler" parent="Sprite" instance=ExtResource("16_ltvqn")]
|
||||
unique_name_in_owner = true
|
||||
scale = Vector2(0.5, 0.5)
|
||||
|
@ -422,6 +424,8 @@ debug_color = Color(1, 0, 0, 0)
|
|||
scene = ExtResource("10_k033w")
|
||||
enabled = false
|
||||
|
||||
[node name="Sacrificable" parent="Sprite/Monocler" instance=ExtResource("7_igror")]
|
||||
|
||||
[node name="Shape" type="CollisionShape2D" parent="."]
|
||||
shape = SubResource("CircleShape2D_mnexs")
|
||||
|
||||
|
@ -446,9 +450,8 @@ 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
|
||||
min_secs = 0.2
|
||||
max_secs = 1.8
|
||||
|
||||
[node name="MovementSampler" parent="." instance=ExtResource("7_nq78n")]
|
||||
|
||||
|
@ -552,11 +555,15 @@ 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= [&"Monocles"]]
|
||||
[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="MovementIdle" to="." method="_on_move"]
|
||||
|
|
|
@ -268,6 +268,8 @@ debug_color = Color(1, 0, 0, 0)
|
|||
scene = ExtResource("8_m3as1")
|
||||
enabled = false
|
||||
|
||||
[node name="Sacrificable" parent="Sprite/TopHatter" instance=ExtResource("7_gg20m")]
|
||||
|
||||
[node name="Monocler" parent="Sprite" instance=ExtResource("14_w2h8x")]
|
||||
unique_name_in_owner = true
|
||||
scale = Vector2(0.5, 0.5)
|
||||
|
@ -289,6 +291,8 @@ debug_color = Color(1, 0, 0, 0)
|
|||
scene = ExtResource("10_gikey")
|
||||
enabled = false
|
||||
|
||||
[node name="Sacrificable" parent="Sprite/Monocler" instance=ExtResource("7_gg20m")]
|
||||
|
||||
[node name="Shape" type="CollisionShape2D" parent="."]
|
||||
shape = SubResource("CircleShape2D_ide4n")
|
||||
|
||||
|
@ -311,9 +315,9 @@ scene = ExtResource("5_yrfoq")
|
|||
|
||||
[node name="SpawnTimer" parent="GoldSpawner" instance=ExtResource("10_phvea")]
|
||||
autostart = true
|
||||
mean_secs = 5.0
|
||||
mean_secs = 3.0
|
||||
min_secs = 1.0
|
||||
max_secs = 9.0
|
||||
max_secs = 5.0
|
||||
|
||||
[node name="MovementSampler" parent="." instance=ExtResource("7_ech8d")]
|
||||
|
||||
|
@ -403,11 +407,15 @@ 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= [&"Monocle"]]
|
||||
[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="changed_direction" from="MovementWander" to="MovementWander/WanderPriority" method="priority_conditional"]
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
[gd_scene load_steps=7 format=3 uid="uid://ddpo03rb6068c"]
|
||||
[gd_scene load_steps=6 format=3 uid="uid://ddpo03rb6068c"]
|
||||
|
||||
[ext_resource type="Script" path="res://entities/sacrifice_stone.gd" id="1_sgl1t"]
|
||||
[ext_resource type="PackedScene" uid="uid://dfdr3e32lohq" path="res://behaviours/edible.tscn" id="1_y58y4"]
|
||||
|
@ -8,9 +8,6 @@
|
|||
[sub_resource type="CircleShape2D" id="CircleShape2D_yv6hf"]
|
||||
radius = 8.0
|
||||
|
||||
[sub_resource type="RectangleShape2D" id="RectangleShape2D_55alx"]
|
||||
size = Vector2(150, 150)
|
||||
|
||||
[node name="SacrificeStone" type="Node2D"]
|
||||
y_sort_enabled = true
|
||||
script = ExtResource("1_sgl1t")
|
||||
|
@ -44,15 +41,5 @@ shape = SubResource("CircleShape2D_yv6hf")
|
|||
one_way_collision_margin = 27.5
|
||||
debug_color = Color(1, 0, 0, 0)
|
||||
|
||||
[node name="ForbidSpawn" type="Area2D" parent="."]
|
||||
position = Vector2(0, -29)
|
||||
collision_layer = 64
|
||||
collision_mask = 0
|
||||
monitoring = false
|
||||
|
||||
[node name="Shape" type="CollisionShape2D" parent="ForbidSpawn"]
|
||||
shape = SubResource("RectangleShape2D_55alx")
|
||||
debug_color = Color(0.733333, 0.447059, 0.411765, 0.419608)
|
||||
|
||||
[connection signal="tracked" from="StoneArea/SacrificeTracker" to="." method="_on_tracked"]
|
||||
[connection signal="untracked" from="StoneArea/SacrificeTracker" to="." method="_on_untracked"]
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
[gd_scene load_steps=37 format=3 uid="uid://bc2bm8lbol18w"]
|
||||
[gd_scene load_steps=38 format=3 uid="uid://bc2bm8lbol18w"]
|
||||
|
||||
[ext_resource type="Script" path="res://entities/sheep.gd" id="1_4dmll"]
|
||||
[ext_resource type="Texture2D" uid="uid://iljp5yn3ehfk" path="res://entities/sheep_left.png" id="2_t13f5"]
|
||||
|
@ -17,6 +17,7 @@
|
|||
[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://g8t6dt0ye6n3" path="res://behaviours/timer_stddev.tscn" id="12_c45uk"]
|
||||
[ext_resource type="PackedScene" uid="uid://b3gydtrenbw3n" path="res://entities/skull.tscn" id="12_lutsy"]
|
||||
[ext_resource type="PackedScene" uid="uid://cml7rqvyfuagx" path="res://behaviours/move_towards.tscn" id="12_x2g3x"]
|
||||
[ext_resource type="PackedScene" uid="uid://cbg5kgwxusvxf" path="res://behaviours/cursor_detector.tscn" id="13_5fkdr"]
|
||||
[ext_resource type="PackedScene" uid="uid://dti7l0d40hhgt" path="res://behaviours/target_picker.tscn" id="13_jf6em"]
|
||||
|
@ -245,6 +246,8 @@ debug_color = Color(1, 0, 0, 0)
|
|||
scene = ExtResource("8_d32x5")
|
||||
enabled = false
|
||||
|
||||
[node name="Sacrificable" parent="Sprite/TopHatter" instance=ExtResource("8_43m1b")]
|
||||
|
||||
[node name="Monocler" parent="Sprite" instance=ExtResource("22_lilpq")]
|
||||
unique_name_in_owner = true
|
||||
position = Vector2(0, 2)
|
||||
|
@ -267,9 +270,14 @@ debug_color = Color(1, 0, 0, 0)
|
|||
scene = ExtResource("10_dmfsp")
|
||||
enabled = false
|
||||
|
||||
[node name="Sacrificable" parent="Sprite/Monocler" instance=ExtResource("8_43m1b")]
|
||||
|
||||
[node name="Shape" type="CollisionShape2D" parent="."]
|
||||
shape = SubResource("CircleShape2D_c5tcn")
|
||||
|
||||
[node name="Spawner" parent="." instance=ExtResource("7_5is0u")]
|
||||
scene = ExtResource("12_lutsy")
|
||||
|
||||
[node name="Animator" type="AnimationPlayer" parent="."]
|
||||
unique_name_in_owner = true
|
||||
libraries = {
|
||||
|
@ -361,6 +369,18 @@ debug_color = Color(1, 0.498039, 0, 0)
|
|||
[node name="TargetPicker" parent="MovementTrap/TrackerTrap" node_paths=PackedStringArray("tracker") instance=ExtResource("13_jf6em")]
|
||||
tracker = NodePath("..")
|
||||
|
||||
[node name="MovementBarn" parent="." instance=ExtResource("10_05kcd")]
|
||||
speed = 66.0
|
||||
direction = Vector2(-1, 0)
|
||||
enabled = false
|
||||
|
||||
[node name="BarnPriority" parent="MovementBarn" instance=ExtResource("11_0jlmk")]
|
||||
alternative_priority = 47
|
||||
|
||||
[node name="ExitedTimer" type="Timer" parent="MovementBarn"]
|
||||
wait_time = 2.0
|
||||
one_shot = true
|
||||
|
||||
[node name="MovementDrag" parent="." instance=ExtResource("14_3wojv")]
|
||||
enabled = false
|
||||
|
||||
|
@ -382,26 +402,18 @@ bus = &"DragSounds"
|
|||
stream = ExtResource("17_8kst2")
|
||||
bus = &"FallSounds"
|
||||
|
||||
[node name="MovementBarn" parent="." instance=ExtResource("10_05kcd")]
|
||||
speed = 66.0
|
||||
direction = Vector2(-1, 0)
|
||||
enabled = false
|
||||
|
||||
[node name="BarnPriority" parent="MovementBarn" instance=ExtResource("11_0jlmk")]
|
||||
alternative_priority = 60
|
||||
|
||||
[node name="ExitedTimer" type="Timer" parent="MovementBarn"]
|
||||
wait_time = 2.0
|
||||
one_shot = true
|
||||
|
||||
[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/Spawner" method="enable"]
|
||||
[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/Spawner" method="enable"]
|
||||
[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="eaten" from="Edible" to="Spawner" method="roll_spawn" binds= [11]]
|
||||
[connection signal="sacrificed" from="Sacrificable" to="." method="queue_free"]
|
||||
[connection signal="move" from="MovementIdle" to="." method="_on_move"]
|
||||
[connection signal="move_disabled" from="MovementIdle" to="MovementIdle/BoredTimer" method="stop"]
|
||||
|
@ -433,6 +445,11 @@ one_shot = true
|
|||
[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="move" from="MovementBarn" to="." method="_on_move"]
|
||||
[connection signal="move_disabled" from="MovementBarn" to="MovementBarn/BarnPriority" method="priority_default"]
|
||||
[connection signal="move_disabled" from="MovementBarn" to="MovementBarn/ExitedTimer" method="stop"]
|
||||
[connection signal="move_enabled" from="MovementBarn" to="MovementBarn/ExitedTimer" method="start"]
|
||||
[connection signal="timeout" from="MovementBarn/ExitedTimer" to="MovementBarn/BarnPriority" method="priority_default"]
|
||||
[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]
|
||||
|
@ -443,7 +460,3 @@ one_shot = true
|
|||
[connection signal="move_enabled" from="MovementDrag" to="MovementWander" method="clear_direction"]
|
||||
[connection signal="dragged" from="MovementDrag/Draggable" to="MovementDrag" method="drag"]
|
||||
[connection signal="dropped" from="MovementDrag/Draggable" to="MovementDrag" method="drop"]
|
||||
[connection signal="move" from="MovementBarn" to="." method="_on_move"]
|
||||
[connection signal="move_disabled" from="MovementBarn" to="MovementBarn/ExitedTimer" method="stop"]
|
||||
[connection signal="move_enabled" from="MovementBarn" to="MovementBarn/ExitedTimer" method="start"]
|
||||
[connection signal="timeout" from="MovementBarn/ExitedTimer" to="MovementBarn/BarnPriority" method="priority_default"]
|
||||
|
|
|
@ -180,6 +180,7 @@ bus = &"DragSounds"
|
|||
stream = ExtResource("6_7yx26")
|
||||
bus = &"FallSounds"
|
||||
|
||||
[connection signal="sacrificed" from="Sacrificable" to="." method="queue_free"]
|
||||
[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"]
|
||||
|
|
|
@ -40,6 +40,18 @@ position = Vector2(75, 62)
|
|||
|
||||
[node name="Recipes" type="Node" parent="."]
|
||||
|
||||
[node name="FiveTopHats" parent="Recipes" instance=ExtResource("5_jbk35")]
|
||||
mode = 2
|
||||
ingredients = Array[StringName]([&"TopHat", &"TopHat", &"TopHat", &"TopHat", &"TopHat"])
|
||||
|
||||
[node name="FiveMonocles" parent="Recipes" instance=ExtResource("5_jbk35")]
|
||||
mode = 2
|
||||
ingredients = Array[StringName]([&"Monocle", &"Monocle", &"Monocle", &"Monocle", &"Monocle"])
|
||||
|
||||
[node name="ASkull" parent="Recipes" instance=ExtResource("5_jbk35")]
|
||||
mode = 1
|
||||
ingredients = Array[StringName]([&"Skull"])
|
||||
|
||||
[node name="FiveSheep" parent="Recipes" instance=ExtResource("5_jbk35")]
|
||||
mode = 2
|
||||
ingredients = Array[StringName]([&"Sheep", &"Sheep", &"Sheep", &"Sheep", &"Sheep"])
|
||||
|
@ -70,6 +82,9 @@ scene = ExtResource("8_jtxan")
|
|||
[node name="Cthulhu" parent="Spawners" instance=ExtResource("2_xq0wr")]
|
||||
scene = ExtResource("9_wli14")
|
||||
|
||||
[connection signal="matched" from="Recipes/FiveTopHats" to="Spawners/Watcher" method="spawn" unbinds=1]
|
||||
[connection signal="matched" from="Recipes/FiveMonocles" to="Spawners/Watcher" method="spawn" unbinds=1]
|
||||
[connection signal="matched" from="Recipes/ASkull" to="Spawners/Chupacabra" method="spawn" unbinds=1]
|
||||
[connection signal="matched" from="Recipes/FiveSheep" to="Spawners/Imp" method="spawn" unbinds=1]
|
||||
[connection signal="matched" from="Recipes/FiveImps" to="Spawners/Chupacabra" method="spawn" unbinds=1]
|
||||
[connection signal="matched" from="Recipes/FiveChupacabras" to="Spawners/Watcher" method="spawn" unbinds=1]
|
||||
|
|
|
@ -274,6 +274,8 @@ debug_color = Color(1, 0, 0, 0)
|
|||
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
|
||||
scale = Vector2(0.5, 0.5)
|
||||
|
@ -296,6 +298,8 @@ debug_color = Color(1, 0, 0, 0)
|
|||
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")
|
||||
|
||||
|
@ -318,9 +322,9 @@ 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
|
||||
mean_secs = 0.2
|
||||
min_secs = 0.1
|
||||
max_secs = 0.3
|
||||
|
||||
[node name="MovementSampler" parent="." instance=ExtResource("4_i1htf")]
|
||||
|
||||
|
@ -413,11 +417,15 @@ 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"]
|
||||
|
|
|
@ -42,6 +42,11 @@ postprocessing_toggle={
|
|||
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":4194311,"key_label":0,"unicode":0,"echo":false,"script":null)
|
||||
]
|
||||
}
|
||||
cheat_gold={
|
||||
"deadzone": 0.5,
|
||||
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":92,"physical_keycode":0,"key_label":0,"unicode":92,"echo":false,"script":null)
|
||||
]
|
||||
}
|
||||
|
||||
[layer_names]
|
||||
|
||||
|
|
|
@ -10,7 +10,7 @@ signal dropped(node: Draggable)
|
|||
|
||||
@onready var game: MainGame = MainGame.get_via_group(self)
|
||||
@onready var gold_display: GoldDisplay = %"GoldDisplay"
|
||||
@onready var sheep_spawner: Spawner = %"SheepSpawner"
|
||||
@onready var cheat_gold_spawner: Spawner = %"CheatGoldSpawner"
|
||||
|
||||
var dragging: Draggable = null
|
||||
|
||||
|
@ -66,3 +66,5 @@ func _input(event: InputEvent) -> void:
|
|||
|
||||
func _physics_process(_delta: float) -> void:
|
||||
position += (game.camera.get_global_mouse_position() - global_position)
|
||||
if Input.is_action_pressed(&"cheat_gold"):
|
||||
cheat_gold_spawner.spawn()
|
||||
|
|
|
@ -1,7 +1,9 @@
|
|||
[gd_scene load_steps=4 format=3 uid="uid://col1q3elvkfwk"]
|
||||
[gd_scene load_steps=6 format=3 uid="uid://col1q3elvkfwk"]
|
||||
|
||||
[ext_resource type="Script" path="res://scenes/game/cursor.gd" id="1_1og6v"]
|
||||
[ext_resource type="PackedScene" uid="uid://cu750c7yd57qa" path="res://scenes/game/gold_display.tscn" id="2_5c4iq"]
|
||||
[ext_resource type="PackedScene" uid="uid://tx1qi6ahlxjp" path="res://behaviours/spawner.tscn" id="3_k7vj5"]
|
||||
[ext_resource type="PackedScene" uid="uid://uoxwjpmgg27a" path="res://entities/gold.tscn" id="4_45u12"]
|
||||
|
||||
[sub_resource type="CircleShape2D" id="CircleShape2D_6ky4x"]
|
||||
radius = 8.0
|
||||
|
@ -18,3 +20,7 @@ debug_color = Color(0, 0.411765, 0, 0)
|
|||
|
||||
[node name="GoldDisplay" parent="." instance=ExtResource("2_5c4iq")]
|
||||
unique_name_in_owner = true
|
||||
|
||||
[node name="CheatGoldSpawner" parent="." instance=ExtResource("3_k7vj5")]
|
||||
unique_name_in_owner = true
|
||||
scene = ExtResource("4_45u12")
|
||||
|
|
|
@ -2,8 +2,9 @@ extends Node2D
|
|||
class_name MainGame
|
||||
|
||||
|
||||
@export var default_spawn_parent: Node2D
|
||||
|
||||
@onready var camera: GameCamera = $"GameCamera"
|
||||
@onready var default_spawn_parent: Node2D = %"DefaultSpawnParent"
|
||||
@onready var inventory: Inventory = %"Inventory"
|
||||
@onready var cursor: Cursor = %"Cursor"
|
||||
@onready var music: Music = %"Music"
|
||||
|
|
File diff suppressed because one or more lines are too long
Loading…
Reference in a new issue