Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public static async UniTask MoveToTarget
- (
- this MAnimalAIControl control,
- Transform target,
- CancellationToken cancellationToken = default,
- bool debug = false
- )
- {
- $"Moving to {target.name}".When(debug, Debug.Log);
- control.SetTarget(target);
- await control.OnArrived.GetAsyncEventHandler(cancellationToken).OnInvokeAsync();
- $"Arrived to {target.name}".When(debug, Debug.Log);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement