private void PatrolBehaviour() { if (AtWayPoint()) { timeSinceArrivedWaypoint = 0; CycleWaypoint(); } if (timeSinceArrivedWaypoint > waypointDwellTime) { mover.StartMoveAction(patrolPath.GetWaypointPosition(currentWaypointIndex), patrolSpeedFraction); } }
//Return position of current waypoints private Vector3 GetCurrentPatrolWaypoint() { return(m_PatrolPath.GetWaypointPosition(m_CurrentWaypointIndex)); }