示例#1
0
 public void SetPartners(List <Tuple <int, int, MotionIK> > partners)
 {
     MotionIK[] motionIkArray = new MotionIK[partners.Count];
     for (int index1 = 0; index1 < motionIkArray.Length; ++index1)
     {
         int index2 = index1;
         motionIkArray[index2] = partners[index2].Item3;
     }
     this.SetPartners(motionIkArray);
 }
示例#2
0
 public void Create(ChaControl chaCtrl, MotionIK motionIK = null, params MotionIK[] partners)
 {
     if (motionIK != null)
     {
         this.motionIK = motionIK;
     }
     else
     {
         this.motionIK = new MotionIK(chaCtrl, false, (MotionIKData)null);
         this.motionIK.SetPartners(partners);
     }
 }
示例#3
0
 public void Next(int index, Dictionary <int, CharaData> charaDataDic)
 {
     Data.Scene scene1 = this.scenes.SafeGet <Data.Scene>(index);
     if (scene1 == null)
     {
         return;
     }
     Data.Scene scene2 = this.scenes.SafeGet <Data.Scene>(index - 1);
     foreach (KeyValuePair <int, CharaData> keyValuePair in charaDataDic)
     {
         Data.Scene.Chara get = scene1.FindGet(keyValuePair.Key);
         if (get != null)
         {
             Data.Scene.Chara chara    = (Data.Scene.Chara)null;
             MotionIK         motionIK = (MotionIK)null;
             YureCtrlEx       yureCtrl = (YureCtrlEx)null;
             bool             flag     = false;
             Data.Scene.Chara.MotionAndItem motionAndItem = get.motionAndItem;
             if (motionAndItem.ik.bundle.IsNullOrEmpty() && scene2 != null)
             {
                 chara = scene2.FindGet(keyValuePair.Key);
                 flag  = true;
                 if (chara != null)
                 {
                     motionIK = chara.motionAndItem.ik.motionIK;
                 }
             }
             if (motionAndItem.yure.bundle.IsNullOrEmpty())
             {
                 if (!flag && scene2 != null)
                 {
                     chara = scene2.FindGet(keyValuePair.Key);
                 }
                 if (chara != null)
                 {
                     yureCtrl = chara.motionAndItem.yure.yureCtrl;
                 }
             }
             motionAndItem.ik.Create(keyValuePair.Value.chaCtrl, motionIK, (MotionIK[])Array.Empty <MotionIK>());
             motionAndItem.yure.Create(keyValuePair.Value.chaCtrl, yureCtrl);
         }
     }
     foreach (KeyValuePair <int, CharaData> keyValuePair in charaDataDic)
     {
         scene1.FindGet(keyValuePair.Key)?.Change(keyValuePair.Value.chaCtrl, this.itemList[keyValuePair.Key]);
     }
 }
示例#4
0
 private Vector3[] GetCorrectShapeValues(ChaControl chara, MotionIKData.Shape[] shapes)
 {
     Vector3[] vector3Array = new Vector3[2]
     {
         Vector3.get_zero(),
               Vector3.get_zero()
     };
     foreach (MotionIKData.Shape shape in shapes)
     {
         float shapeBodyValue = chara.GetShapeBodyValue(shape.shapeNo);
         for (int index = 0; index < vector3Array.Length; ++index)
         {
             if (index == 0)
             {
                 ref Vector3 local = ref vector3Array[index];
                 local = Vector3.op_Addition(local, MotionIK.GetShapeLerpPositionValue(shapeBodyValue, shape.small[index], shape.mediam[index], shape.large[index], this.MapIK));
             }
示例#5
0
 public void SetItems(MotionIK motionIK, GameObject[] items)
 {
     for (int index1 = 0; index1 < this.partners.Length; ++index1)
     {
         for (int index2 = 0; index2 < items.Length; ++index2)
         {
             if (this.partners[index1].items == null)
             {
                 this.partners[index1].items = new List <GameObject>();
             }
             if (!this.partners[index1].items.Contains(items[index2]))
             {
                 this.partners[index1].items.Add(items[index2]);
             }
         }
     }
 }
示例#6
0
 public void Initialize()
 {
     this.itemDic = new Dictionary <int, CharaData.CharaItem>();
     if (this.motionReserver != null)
     {
         if (this.motionReserver.ikMotion != null)
         {
             this._ikMotion = this.motionReserver.ikMotion;
         }
         if (this.motionReserver.yureMotion != null)
         {
             this._yureMotion = this.motionReserver.yureMotion;
         }
         if (this.motionReserver.motionOverride != null)
         {
             this._motionOverride = this.motionReserver.motionOverride;
         }
     }
     if (this._yureMotion == null)
     {
         this._yureMotion = new YureMotion();
         this._yureMotion.Create(this.chaCtrl, (YureCtrlEx)null);
     }
     if (this.isADVCreateChara)
     {
         this.scenario.commandController.LoadingCharaList.Remove(this);
         this.chaCtrl.SetActiveTop(true);
         MotionIK motionIK = new MotionIK(this.chaCtrl, false, (MotionIKData)null);
         if (this._ikMotion == null)
         {
             this._ikMotion = new IKMotion();
             this._ikMotion.Create(this.chaCtrl, motionIK, (MotionIK[])Array.Empty <MotionIK>());
         }
     }
     this.initialized = true;
 }