From 91c4776a33e2827682a0bc638eb7ce2a2208e848 Mon Sep 17 00:00:00 2001 From: Stefano Pigozzi Date: Fri, 19 Apr 2024 01:58:33 +0200 Subject: [PATCH] Remove debug logging from `MoveStraight` --- behaviours/move_straight.gd | 6 +++--- behaviours/move_straight.tscn | 2 -- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/behaviours/move_straight.gd b/behaviours/move_straight.gd index a483c31..4e6ec30 100644 --- a/behaviours/move_straight.gd +++ b/behaviours/move_straight.gd @@ -26,10 +26,10 @@ func clear_direction() -> void: func randomize_direction() -> void: direction = Vector2.from_angle(Random.rng.randf_range(0, 2*PI)) +func log_state() -> void: + Log.p(self, "Direction: %s | Speed: %s" % [direction, speed]) + func _physics_process(delta: float) -> void: if enabled: move.emit(direction * delta * speed) - -func _on_changed_direction(new: Vector2) -> void: - Log.p(self, "Changed direction to: %s" % new) diff --git a/behaviours/move_straight.tscn b/behaviours/move_straight.tscn index 11a2a41..e176db3 100644 --- a/behaviours/move_straight.tscn +++ b/behaviours/move_straight.tscn @@ -4,5 +4,3 @@ [node name="MoveStraight" type="Node2D"] script = ExtResource("1_8yf73") - -[connection signal="changed_direction" from="." to="." method="_on_changed_direction"]