1
Fork 0
mirror of https://github.com/Steffo99/hella-farm.git synced 2024-11-24 17:14:23 +00:00

Setup a nice little scene

This commit is contained in:
Steffo 2024-04-19 03:46:21 +02:00
parent 4b3e05b74f
commit fd91909d04
Signed by: steffo
GPG key ID: 5ADA3868646C3FC0
2 changed files with 23 additions and 9 deletions

View file

@ -42,9 +42,11 @@ shape = SubResource("CircleShape2D_ide4n")
[node name="CoinSpawner" parent="." instance=ExtResource("4_d8lgm")]
scene = ExtResource("5_yrfoq")
[node name="Timer" type="Timer" parent="CoinSpawner"]
wait_time = 0.8
autostart = true
[node name="TimerStddev" parent="CoinSpawner" instance=ExtResource("10_phvea")]
mean_secs = 5.0
deviation = 4.0
min_secs = 1.0
max_secs = 9.0
[node name="MovementSampler" parent="." node_paths=PackedStringArray("possibilities") instance=ExtResource("7_ech8d")]
possibilities = [NodePath("../MovementWander/WanderPriority"), NodePath("../MovementHunt/HuntPriority")]
@ -89,7 +91,7 @@ acceptable_diets = Array[StringName]([&"Meat"])
shape = SubResource("CircleShape2D_qhk1q")
debug_color = Color(1, 0, 0, 0)
[connection signal="timeout" from="CoinSpawner/Timer" to="CoinSpawner" method="spawn"]
[connection signal="timeout" from="CoinSpawner/TimerStddev" to="CoinSpawner" method="spawn"]
[connection signal="ready" from="MovementSampler" to="MovementSampler" method="enable"]
[connection signal="changed_direction" from="MovementWander" to="MovementWander/WanderPriority" method="priority_conditional"]
[connection signal="move" from="MovementWander" to="." method="_on_move"]
@ -101,4 +103,5 @@ debug_color = Color(1, 0, 0, 0)
[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="eaten" from="Eater" to="." method="_on_eater_eaten"]

View file

@ -1,4 +1,4 @@
[gd_scene load_steps=11 format=3 uid="uid://cxj5aud02f40j"]
[gd_scene load_steps=13 format=3 uid="uid://cxj5aud02f40j"]
[ext_resource type="Script" path="res://scenes/game/main_game.gd" id="1_wiglu"]
[ext_resource type="PackedScene" uid="uid://dm068vaseh45n" path="res://scenes/game/game_camera.tscn" id="2_db5xs"]
@ -7,6 +7,8 @@
[ext_resource type="PackedScene" uid="uid://col1q3elvkfwk" path="res://scenes/game/cursor.tscn" id="5_g504x"]
[ext_resource type="PackedScene" uid="uid://bc2bm8lbol18w" path="res://entities/sheep.tscn" id="6_j2kdp"]
[ext_resource type="PackedScene" uid="uid://4d3ksr3171x4" path="res://entities/imp.tscn" id="7_7od2n"]
[ext_resource type="PackedScene" uid="uid://tx1qi6ahlxjp" path="res://behaviours/spawner.tscn" id="7_kqc55"]
[ext_resource type="PackedScene" uid="uid://g8t6dt0ye6n3" path="res://behaviours/timer_stddev.tscn" id="9_8875b"]
[sub_resource type="TileSetAtlasSource" id="TileSetAtlasSource_058kb"]
texture = ExtResource("2_o7bg5")
@ -831,11 +833,8 @@ unique_name_in_owner = true
[node name="Cursor" parent="." instance=ExtResource("5_g504x")]
[node name="Sheep" parent="." instance=ExtResource("6_j2kdp")]
position = Vector2(-246, 25)
[node name="Imp" parent="." instance=ExtResource("7_7od2n")]
position = Vector2(237, 10)
position = Vector2(102, -21)
[node name="Walls" type="Node2D" parent="."]
@ -873,3 +872,15 @@ collision_mask = 0
[node name="Shape" type="CollisionShape2D" parent="Walls/LeftBoundary"]
shape = SubResource("WorldBoundaryShape2D_htttx")
[node name="Spawner" parent="." instance=ExtResource("7_kqc55")]
position = Vector2(-386, 162)
scene = ExtResource("6_j2kdp")
[node name="TimerStddev" parent="Spawner" instance=ExtResource("9_8875b")]
autostart = true
mean_secs = 6.0
min_secs = 3.0
max_secs = 9.0
[connection signal="timeout" from="Spawner/TimerStddev" to="Spawner" method="spawn"]