Example #1
0
        private void PatrolBehaviour()
        {
            if (AtWayPoint())
            {
                timeSinceArrivedWaypoint = 0;
                CycleWaypoint();
            }

            if (timeSinceArrivedWaypoint > waypointDwellTime)
            {
                mover.StartMoveAction(patrolPath.GetWaypointPosition(currentWaypointIndex), patrolSpeedFraction);
            }
        }
Example #2
0
 //Return position of current waypoints
 private Vector3 GetCurrentPatrolWaypoint()
 {
     return(m_PatrolPath.GetWaypointPosition(m_CurrentWaypointIndex));
 }