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"]