Exemplo n.º 1
0
 public static Transform GetNamingMatch(Transform[] transforms, params string[][] namings)
 {
     foreach (Transform transform in transforms)
     {
         bool flag = true;
         foreach (string namingConvention in namings)
         {
             if (!BipedNaming.matchesNaming(transform.name, namingConvention))
             {
                 flag = false;
                 break;
             }
         }
         if (flag)
         {
             return(transform);
         }
     }
     return(null);
 }
Exemplo n.º 2
0
 public static Transform GetNamingMatch(Transform[] transforms, params string[][] namings)
 {
     for (int i = 0; i < transforms.Length; i++)
     {
         Transform transform = transforms[i];
         bool      flag      = true;
         for (int j = 0; j < namings.Length; j++)
         {
             string[] namingConvention = namings[j];
             if (!BipedNaming.matchesNaming(transform.name, namingConvention))
             {
                 flag = false;
                 break;
             }
         }
         if (flag)
         {
             return(transform);
         }
     }
     return(null);
 }
Exemplo n.º 3
0
 private static bool isTypeExclude(string boneName)
 {
     return(BipedNaming.matchesNaming(boneName, BipedNaming.typeExclude));
 }
Exemplo n.º 4
0
 private static bool isEye(string boneName)
 {
     return(BipedNaming.matchesNaming(boneName, BipedNaming.typeEye) && !BipedNaming.excludesNaming(boneName, BipedNaming.typeExcludeEye));
 }
Exemplo n.º 5
0
 private static bool isTail(string boneName)
 {
     return(BipedNaming.matchesNaming(boneName, BipedNaming.typeTail) && !BipedNaming.excludesNaming(boneName, BipedNaming.typeExcludeTail));
 }
Exemplo n.º 6
0
 private static bool isHead(string boneName)
 {
     return(BipedNaming.matchesNaming(boneName, BipedNaming.typeHead) && !BipedNaming.excludesNaming(boneName, BipedNaming.typeExcludeHead));
 }
Exemplo n.º 7
0
 private static bool isRight(string boneName)
 {
     return(BipedNaming.matchesNaming(boneName, BipedNaming.typeRight) || BipedNaming.lastLetter(boneName) == "R" || BipedNaming.firstLetter(boneName) == "R");
 }
Exemplo n.º 8
0
 private static bool isLeft(string boneName)
 {
     return(BipedNaming.matchesNaming(boneName, BipedNaming.typeLeft) || BipedNaming.lastLetter(boneName) == "L" || BipedNaming.firstLetter(boneName) == "L");
 }