예제 #1
0
 private void ChooseBehavior()
 {
     if (EnemyEntities.Any() &&
         MyEntities.Any(e => GetDistance(GetNearestEntity(e.Position, PlayerType.Enemy).Position, e.Position) < 6))
     // ||
     // EnemyUnits.Any(eu => GetDistance(eu.Position, Zero) <= 35))
     {
         Behavior   = BehaviorType.Aggressive;
         unitsRatio = aggressiveBehaviorUnitsRatio;
     }
     else
     {
         Behavior   = BehaviorType.Passive;
         unitsRatio = passiveBehaviorUnitsRatio;
     }
 }