Exemplo n.º 1
0
    public override void runNavigatorUpdate(UnitNavigationController navigator)
    {
        SetTarget(navigator.gameObject, navigator);

        if (navigator.target == null)
        {
            navigator.SetSpeed(navigator.RunningSpeed);
            navigator.Panicking();
        }
        else
        {
            navigator.SetSpeed(navigator.RunningSpeed);
            navigator.SetNavDestination(navigator.target.transform.position);
        }
    }
Exemplo n.º 2
0
    public override void runNavigatorUpdate(UnitNavigationController navigator)
    {
        SetTarget(navigator.gameObject, navigator);

        if (navigator.target == null)
        {
            navigator.Stop();
            stop = true;
        }
        else
        {
            navigator.SetNavDestination(navigator.target.transform.position);
        }

        if (!stop)
        {
            navigator.SetSpeed(speed);
        }
    }