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