コード例 #1
0
 /// <summary>
 /// Returns all other fighters within sight.
 /// </summary>
 public static IEnumerable <IFighterStats> GetVisibleFightersFor(this IEnumerable <IFighterStats> fighters, IFighterStats fighter, EngineCalculationValues calculationValues)
 {
     return(fighters
            .Where(o => o.HealthRemaining(calculationValues) > 0)
            .Where(o => o.Id != fighter.Id && o.GetDistance(fighter) <= fighter.VisualRange(calculationValues)));
 }