Ejemplo n.º 1
0
 /// <summary>
 /// Get first affectable ot type
 /// </summary>
 /// <param name="container">Affectable container</param>
 /// <typeparam name="TEffect">Effect type</typeparam>
 /// <returns></returns>
 public static IAffectable <TEffect> GetAffectable <TEffect>(this IAffectableContainer container) where TEffect : Effect =>
 container.GetAffectables <TEffect>().First();
Ejemplo n.º 2
0
 /// <summary>
 /// Get affectables of type
 /// </summary>
 /// <param name="container">Affectable container</param>
 /// <typeparam name="TEffect">Affectable effect type</typeparam>
 /// <returns></returns>
 public static IEnumerable <IAffectable <TEffect> > GetAffectables <TEffect>(this IAffectableContainer container) where TEffect : Effect =>
 container.Affectables.OfType <IAffectable <TEffect> >();