diff --git a/entities/imp.gd b/entities/imp.gd index ee93ec7..e87d76e 100644 --- a/entities/imp.gd +++ b/entities/imp.gd @@ -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) diff --git a/entities/imp.tscn b/entities/imp.tscn index 08e5ec3..dd65ee4 100644 --- a/entities/imp.tscn +++ b/entities/imp.tscn @@ -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"]