コード例 #1
0
ファイル: clsurgutils.cs プロジェクト: GameDiffs/TheForest
 public static void metdrivebodypart(clsurgent varpsource, clsurgutils.enumparttypes varppart, int varppartindex)
 {
     clsurgutils.metdriveanimatebodypart(varpsource, varppart, varppartindex, false);
 }
コード例 #2
0
ファイル: clsurgutils.cs プロジェクト: GameDiffs/TheForest
 public static void metdriveanimatebodypart(clsurgent varpsource, clsurgutils.enumparttypes varppart, int varppartindex, bool varpanimate)
 {
     if (varpsource != null)
     {
         Transform[] array = new Transform[0];
         switch (varppart)
         {
         case clsurgutils.enumparttypes.head:
             array = varpsource.vargamnodes.vargamhead;
             break;
         case clsurgutils.enumparttypes.spine:
             array = varpsource.vargamnodes.vargamspine;
             break;
         case clsurgutils.enumparttypes.arm_left:
             array = varpsource.vargamnodes.vargamarmleft;
             break;
         case clsurgutils.enumparttypes.arm_right:
             array = varpsource.vargamnodes.vargamarmright;
             break;
         case clsurgutils.enumparttypes.leg_left:
             array = varpsource.vargamnodes.vargamlegleft;
             break;
         case clsurgutils.enumparttypes.leg_right:
             array = varpsource.vargamnodes.vargamlegright;
             break;
         default:
             Debug.LogError("Unmanaged part type");
             break;
         }
         for (int i = varppartindex; i < array.Length; i++)
         {
             if (array[i] != null && array[i].GetComponent<Rigidbody>() != null)
             {
                 array[i].GetComponent<Rigidbody>().isKinematic = varpanimate;
             }
         }
     }
     else
     {
         Debug.LogError("Received a request to URG drive a null source");
     }
 }