示例#1
0
 private bool EnemyDetected()
 {
     if (m_targetUpdateRate <= 0)
     {
         m_targetUpdateRate = GameDataManager.instance.GlobalConfig.m_targetUpdateRate;
         MobaEntity target;
         ETeam      m_targetTeam = m_entity.GetAbilityTargetTeam(EAllegiance.Hostile);
         if (Utils.IsOnRangeWithPriority(m_entity.Position, GameManager.instance.TeamEntities[m_targetTeam], "AIEntity", m_detectionRange, out target))
         {
             m_entity.Target     = target;
             m_detectionPosition = m_entity.Position;
             return(true);
         }
     }
     return(false);
 }