示例#1
0
    private void NavigateTo(Vector3 target)
    {
        if (!navigationActions.TryGetValue(navigationState, out var navigationAction))
        {
            throw new ArgumentOutOfRangeException(nameof(navigationState), navigationState.ToString());
        }
        navigationState = navigationAction.Invoke(target);

        KeepNavigationAgentAtRigidbody();
    }
 protected virtual void TransitionToNavigationState(NavigationState navigationState, bool useTransitions)
 {
     VisualStateManager.GoToState(this as Control, navigationState.ToString(), useTransitions);
     base.TransitionToNavigationState(navigationState);
 }