bool CanFindTarget() { waypoint = AIManager.RandomWayPoint(); if (lastWaypoint == waypoint) { waypoint = AIManager.RandomWayPoint(); return(false); } else { lastWaypoint = waypoint; speed = Random.Range(1, 7); animator.speed = speed; return(true); } }
bool CanFindTarget(float start = 1f, float end = 7f) { m_WayPoint = m_AIManager.RandomWayPoint(); if (m_LastWayPoint == m_WayPoint) { m_WayPoint = m_AIManager.RandomWayPoint(); return(false); } else { m_LastWayPoint = m_WayPoint; m_Speed = Random.Range(start, end); //m_Animator.speed = m_Speed; return(true); } }
bool CanFindTarget(float start = 1f, float end = 4f) { m_wayPoint = m_AIManager.RandomWayPoint(); if (m_lastWaypoint == m_wayPoint) { m_wayPoint = m_AIManager.RandomWayPoint(); return(false); } else { m_lastWaypoint = m_wayPoint; m_speed = Random.Range(start, end); m_animator.speed = m_speed; return(true); } }
bool CanFindTarget(float start = 1f, float end = 7f) { m_wayPoint = m_AIManager.RandomWayPoint(); //make sure we not set the same waypoint twice if (m_lastWaypoint == m_wayPoint) { m_wayPoint = m_AIManager.RandomWayPoint(); return(false); } else { // set the last way point to be the new one m_lastWaypoint = m_wayPoint; m_speed = UnityEngine.Random.Range(start, end); // change the animator speed for the Defeqult Level - TIP m_animator.speed = m_speed; return(true); } }