예제 #1
0
    public void Exit()
    {
        if (route != null)
        {
            route.DismissGuard();
        }

        navAgent.isStopped = true;
    }
예제 #2
0
    public static PatrolRoute GetNewRoute(PatrolRoute previousRoute = null)
    {
        if (previousRoute != null)
        {
            previousRoute.DismissGuard();
        }

        PatrolRoute avilableRoute = routes.RandomWeighted(x => totalGuardsOnPatrol - x.guardsOnPatrol);

        avilableRoute.RegisterGuard();
        Debug.Log(avilableRoute);
        return(avilableRoute);
    }