daily pastebin goal
44%
SHARE
TWEET

BustGravity

a guest Oct 5th, 2016 92 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. public class BustGravity
  2. {
  3.     // Token: 0x06000CA8 RID: 3240 RVA: 0x0005E0A8 File Offset: 0x0005C2A8
  4.     public BustGravity(CharFemale _female)
  5.     {
  6.         this.female = _female;
  7.         if (this.female)
  8.         {
  9.             this.customInfo = this.female.femaleCustomInfo;
  10.         }
  11.     }
  12.  
  13.     // Token: 0x06000CA9 RID: 3241 RVA: 0x0005E0F8 File Offset: 0x0005C2F8
  14.     public void Change(float gravity, int[] changePtn)
  15.     {
  16.         if (null == this.female)
  17.         {
  18.             return;
  19.         }
  20.         if (this.customInfo == null)
  21.         {
  22.             return;
  23.         }
  24.         this.customInfo.bustWeight = gravity;
  25.         this.ReCalc(changePtn);
  26.     }
  27.  
  28.     // Token: 0x06000CAA RID: 3242 RVA: 0x0005E12C File Offset: 0x0005C32C
  29.     public void ReCalc(int[] changePtn)
  30.     {
  31.         if (null == this.female)
  32.         {
  33.             return;
  34.         }
  35.         if (this.customInfo == null)
  36.         {
  37.             return;
  38.         }
  39.         if (changePtn.Length == 0)
  40.         {
  41.             return;
  42.         }
  43.         float num = this.customInfo.shapeValueBody[1] * this.customInfo.bustSoftness * 0.5f;
  44.         float y = Mathf.Lerp(this.range[0], this.range[1], this.customInfo.bustWeight) * num;
  45.         DynamicBone_Ver02[] array = new DynamicBone_Ver02[]
  46.         {
  47.             this.female.getDynamicBone(CharFemaleBody.DynamicBoneKind.BreastL),
  48.             this.female.getDynamicBone(CharFemaleBody.DynamicBoneKind.BreastR)
  49.         };
  50.         for (int i = 0; i < changePtn.Length; i++)
  51.         {
  52.             int ptn = changePtn[i];
  53.             DynamicBone_Ver02[] array2 = array;
  54.             for (int j = 0; j < array2.Length; j++)
  55.             {
  56.                 DynamicBone_Ver02 dynamicBone_Ver = array2[j];
  57.                 if (dynamicBone_Ver != null)
  58.                 {
  59.                     dynamicBone_Ver.setGravity(ptn, new Vector3(0f, y, 0f), true);
  60.                 }
  61.             }
  62.         }
  63.     }
  64.  
  65.     // Token: 0x04000E79 RID: 3705
  66.     private CharFileInfoCustomFemale customInfo;
  67.  
  68.     // Token: 0x04000E78 RID: 3704
  69.     private CharFemale female;
  70.  
  71.     // Token: 0x04000E7A RID: 3706
  72.     private float[] range = new float[]
  73.     {
  74.         0f,
  75.         -0.005f
  76.     };
  77. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top