public static bool RequiresComponent <A, B, C>(this TraitDescriptor descriptor, out A first, out B second, out C third) where A : Component where B : Component where C : Component { var a = descriptor.RequiresComponent(out first, out second); var b = descriptor.RequiresComponent(out third); return(a && b); }
public static bool RequiresComponent <A, B, C, D, E, F, G, H>(this TraitDescriptor descriptor, out A first, out B second, out C third, out D fourth, out E fifth, out F sixth, out G seventh, out H eighth) where A : Component where B : Component where C : Component where D : Component where E : Component where F : Component where G : Component where H : Component { var a = descriptor.RequiresComponent(out first, out second, out third, out fourth, out fifth, out sixth, out seventh); var b = descriptor.RequiresComponent(out eighth); return(a && b); }
public static bool RequiresComponent <A>(this TraitDescriptor descriptor, out A first) where A : Component { var found = descriptor.RequiresComponent <A>(); if (descriptor.Successful) { first = found; } else { first = null; } return(descriptor.Successful); }