mirror of
https://github.com/Steffo99/hella-farm.git
synced 2024-11-21 23:54:23 +00:00
Remove more unused references in Imp
This commit is contained in:
parent
2b39bb4551
commit
081a4f905d
2 changed files with 2 additions and 7 deletions
|
@ -1,17 +1,10 @@
|
|||
extends CharacterBody2D
|
||||
class_name Imp
|
||||
|
||||
@export var skull_chance: float = 0.2
|
||||
|
||||
@onready var skull_spawner: Spawner = $"SkullSpawner"
|
||||
@onready var sprite: SpriteLeftRight = $"Sprite"
|
||||
|
||||
|
||||
func _on_eat_target_eaten(target: Edible):
|
||||
target.queue_free()
|
||||
if Random.rng.randf() < skull_chance:
|
||||
skull_spawner.spawn()
|
||||
|
||||
func _on_move(movement:Vector2):
|
||||
move_and_collide(movement)
|
||||
sprite.handle_move(movement)
|
||||
|
|
|
@ -55,6 +55,7 @@ alternative_priority = 10
|
|||
|
||||
[node name="ChangeDirectionTimer" parent="MovementWander" instance=ExtResource("10_phvea")]
|
||||
one_shot = true
|
||||
autostart = true
|
||||
mean_secs = 2.0
|
||||
deviation = 2.0
|
||||
min_secs = 0.6
|
||||
|
@ -86,6 +87,7 @@ tracker = NodePath("..")
|
|||
[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="priority_changed" from="MovementHunt/HuntPriority" to="MovementHunt/HuntPriority" method="log_priority"]
|
||||
[connection signal="tracked" from="MovementHunt/TrackerMeat" to="MovementHunt/TrackerMeat/TargetPicker" method="sample_target_if_null"]
|
||||
[connection signal="untracked" from="MovementHunt/TrackerMeat" to="MovementHunt/TrackerMeat/TargetPicker" method="clear_if_target"]
|
||||
[connection signal="target_changed" from="MovementHunt/TrackerMeat/TargetPicker" to="MovementHunt/TrackerMeat/TargetPicker" method="sample_target_if_null"]
|
||||
|
|
Loading…
Reference in a new issue