Example #1
0
 public bool LoadParam(List <MotionBustCtrlData.Param> _param)
 {
     foreach (MotionBustCtrlData.Param obj in _param)
     {
         if (!obj.State.IsNullOrEmpty())
         {
             string        state = obj.State;
             YureCtrl.Info info;
             if (!this.dicInfo.TryGetValue(state, out info))
             {
                 this.dicInfo[state] = info = new YureCtrl.Info();
             }
             int           num1        = 0;
             bool[]        aIsActive1  = info.aIsActive;
             List <string> parameters1 = obj.Parameters;
             int           index1      = num1;
             int           num2        = index1 + 1;
             int           num3        = parameters1.GetElement <string>(index1) == "1" ? 1 : 0;
             aIsActive1[0] = num3 != 0;
             info.aBreastShape[0].MemberInit();
             for (int index2 = 0; index2 < YureCtrlEx._bustIndexes.Length; ++index2)
             {
                 info.aBreastShape[0].breast[index2] = obj.Parameters.GetElement <string>(num2++) == "1";
             }
             ref YureCtrl.BreastShapeInfo local1 = ref info.aBreastShape[0];
             List <string> parameters2           = obj.Parameters;
             int           index3 = num2;
             int           num4   = index3 + 1;
             int           num5   = parameters2.GetElement <string>(index3) == "1" ? 1 : 0;
             local1.nip = num5 != 0;
             bool[]        aIsActive2  = info.aIsActive;
             List <string> parameters3 = obj.Parameters;
             int           index4      = num4;
             int           num6        = index4 + 1;
             int           num7        = parameters3.GetElement <string>(index4) == "1" ? 1 : 0;
             aIsActive2[1] = num7 != 0;
             info.aBreastShape[1].MemberInit();
             for (int index2 = 0; index2 < YureCtrlEx._bustIndexes.Length; ++index2)
             {
                 info.aBreastShape[1].breast[index2] = obj.Parameters.GetElement <string>(num6++) == "1";
             }
             ref YureCtrl.BreastShapeInfo local2 = ref info.aBreastShape[1];
             List <string> parameters4           = obj.Parameters;
             int           index5 = num6;
             int           num8   = index5 + 1;
             int           num9   = parameters4.GetElement <string>(index5) == "1" ? 1 : 0;
             local2.nip = num9 != 0;
             bool[]        aIsActive3  = info.aIsActive;
             List <string> parameters5 = obj.Parameters;
             int           index6      = num8;
             int           num10       = index6 + 1;
             int           num11       = parameters5.GetElement <string>(index6) == "1" ? 1 : 0;
             aIsActive3[2] = num11 != 0;
             bool[]        aIsActive4  = info.aIsActive;
             List <string> parameters6 = obj.Parameters;
             int           index7      = num10;
             int           num12       = index7 + 1;
             int           num13       = parameters6.GetElement <string>(index7) == "1" ? 1 : 0;
             aIsActive4[3] = num13 != 0;
         }
Example #2
0
 public bool Proc(AnimatorStateInfo _ai, int _id)
 {
     if (!this.isInit[_id])
     {
         return(false);
     }
     YureCtrl.Info info = (YureCtrl.Info)null;
     if (this.lstInfo != null && this.lstInfo[_id] != null)
     {
         for (int index = 0; index < this.lstInfo[_id].Count; ++index)
         {
             if (((AnimatorStateInfo) ref _ai).IsName(this.lstInfo[_id][index].nameAnimation) && this.lstInfo[_id][index].nFemale == 0)
             {
                 info = this.lstInfo[_id][index];
                 break;
             }
         }
     }
     if (info != null)
     {
         this.Active(info.aIsActive, _id);
         this.Shape(info.aBreastShape, _id);
         return(true);
     }
     this.Active(this.aYureEnableActive[_id], _id);
     this.Shape(this.aBreastShapeEnable[_id], _id);
     return(false);
 }
Example #3
0
        public bool Load(string _bundle, string _file, int _motionId, int _femaleID)
        {
            this.IsInit = false;
            this.ResetShape(true);
            if (!GlobalMethod.AssetFileExist(_bundle, _file, string.Empty))
            {
                return(false);
            }
            this.FemaleID = _femaleID;
            this.lstInfo.Clear();
            ExcelData excelData = CommonLib.LoadAsset <ExcelData>(_bundle, _file, false, string.Empty);
            bool      flag      = ((IEnumerable <string>) new string[2]
            {
                "ail",
                "ai3p"
            }).Contains <string>(_file.Split('_')[0]);

            int[] numArray = new int[7] {
                2, 3, 4, 5, 6, 7, 8
            };
            int work = 0;

            foreach (ExcelData.Param obj in excelData.list.Where <ExcelData.Param>((Func <ExcelData.Param, bool>)(v => int.TryParse(v.list.SafeGet <string>(0), out work) && work == _motionId)))
            {
                int           num1   = 1;
                YureCtrl.Info info1  = new YureCtrl.Info();
                List <string> list   = obj.list;
                int           result = 0;
                if (flag && !int.TryParse(list.GetElement <string>(num1++), out result))
                {
                    result = 0;
                }
                info1.nFemale = result;
                YureCtrl.Info info2   = info1;
                List <string> source1 = list;
                int           index1  = num1;
                int           num2    = index1 + 1;
                string        element = source1.GetElement <string>(index1);
                info2.nameAnimation = element;
                bool[]        aIsActive1 = info1.aIsActive;
                List <string> source2    = list;
                int           index2     = num2;
                int           num3       = index2 + 1;
                int           num4       = source2.GetElement <string>(index2) == "1" ? 1 : 0;
                aIsActive1[0] = num4 != 0;
                info1.aBreastShape[0].MemberInit();
                for (int index3 = 0; index3 < numArray.Length; ++index3)
                {
                    info1.aBreastShape[0].breast[index3] = list.GetElement <string>(num3++) == "1";
                }
                ref YureCtrl.BreastShapeInfo local1 = ref info1.aBreastShape[0];
                List <string> source3 = list;
                int           index4  = num3;
                int           num5    = index4 + 1;
                int           num6    = source3.GetElement <string>(index4) == "1" ? 1 : 0;
                local1.nip = num6 != 0;
                bool[]        aIsActive2 = info1.aIsActive;
                List <string> source4    = list;
                int           index5     = num5;
                int           num7       = index5 + 1;
                int           num8       = source4.GetElement <string>(index5) == "1" ? 1 : 0;
                aIsActive2[1] = num8 != 0;
                info1.aBreastShape[1].MemberInit();
                for (int index3 = 0; index3 < numArray.Length; ++index3)
                {
                    info1.aBreastShape[1].breast[index3] = list.GetElement <string>(num7++) == "1";
                }
                ref YureCtrl.BreastShapeInfo local2 = ref info1.aBreastShape[1];