Esempio n. 1
0
        private void Start()
        {
            fighter         = GetComponent <Fighter>();
            player          = GameObject.FindWithTag("Player");
            health          = GetComponent <Health>();
            mover           = GetComponent <Mover>();
            actionScheduler = GetComponent <ActionScheduler>();

            guardLocation = transform.position;

            // ensure we patrol at the nearest waypoint in the patrol path
            if (patrolPath != null)
            {
                currentWaypointIndex = patrolPath.GetClosestWayPointIndex(transform.position);
            }
        }