Reduce logging spam
This commit is contained in:
@@ -5,6 +5,10 @@ enum States {
|
||||
PECKING
|
||||
}
|
||||
|
||||
@export var minimum_pecking_schedule_gap := 8.0
|
||||
@export var maximum_pecking_schedule_gap := 25.0
|
||||
@export var should_log_pecking_schedule := false
|
||||
|
||||
@onready var animated_sprite_2d: AnimatedSprite2D = $AnimatedSprite2D
|
||||
|
||||
var current_state := States.IDLE
|
||||
@@ -23,11 +27,12 @@ func _process(delta: float) -> void:
|
||||
animated_sprite_2d.play("pecking")
|
||||
await animated_sprite_2d.animation_finished
|
||||
animated_sprite_2d.play("idle")
|
||||
pecking_sched = randf_range(8.0, 25.0)
|
||||
pecking_sched = randf_range(minimum_pecking_schedule_gap, maximum_pecking_schedule_gap)
|
||||
pecking_timer = 0
|
||||
current_state = States.IDLE
|
||||
_print_sched()
|
||||
|
||||
|
||||
func _print_sched() -> void:
|
||||
print("%s Pecking Schedule: %f" % [name, pecking_sched])
|
||||
if should_log_pecking_schedule:
|
||||
print("%s Pecking Schedule: %f" % [name, pecking_sched])
|
||||
|
||||
Reference in New Issue
Block a user