diff --git a/behaviours/move_towards.gd b/behaviours/move_towards.gd index 5e07d57..4dad3a0 100644 --- a/behaviours/move_towards.gd +++ b/behaviours/move_towards.gd @@ -24,6 +24,9 @@ func set_target(value: Node2D) -> void: func clear_target() -> void: target = null +func log_target() -> void: + Log.p(self, "Target: %s" % target) + func _physics_process(delta: float) -> void: if enabled: @@ -33,6 +36,3 @@ func _physics_process(delta: float) -> void: move.emit(norm * delta * speed) else: move.emit(Vector2.ZERO) - -func _on_changed_target(new: Node2D) -> void: - Log.p(self, "Changed target to: %s" % new) diff --git a/behaviours/move_towards.tscn b/behaviours/move_towards.tscn index 2c7f758..41b4c4a 100644 --- a/behaviours/move_towards.tscn +++ b/behaviours/move_towards.tscn @@ -4,5 +4,3 @@ [node name="MoveTowards" type="Node2D"] script = ExtResource("1_256ue") - -[connection signal="changed_target" from="." to="." method="_on_changed_target"]