Пример #1
0
    private void PatrolBehaviour()
    {
        fighter.Cancel();
        Vector3 nextPosition = startPosition;

        if (path != null)
        {
            if (isReachedWayPoint())
            {
                timeSinceStop   = 0;
                currentWayPoint = path.GetNextChildPosition(currentWayPoint);
            }
            nextPosition = path.GetChildPosition(currentWayPoint);
        }

        if (timeSinceStop > stopTime)
        {
            mover.StartMovement(nextPosition, patrolSpeedFraction);
        }
    }