コード例 #1
0
 public static List <string> LoadAllListTextFromList(
     string _assetbundleFolder,
     string _strLoadFile,
     ref List <string> lst,
     List <string> _OmitFolderName = null)
 {
     GlobalMethod.lstABName.Clear();
     GlobalMethod.lstABName = GlobalMethod.GetAssetBundleNameListFromPath(_assetbundleFolder, false);
     GlobalMethod.lstABName.Sort();
     for (int index = 0; index < GlobalMethod.lstABName.Count; ++index)
     {
         string stringRight = YS_Assist.GetStringRight(Path.GetFileNameWithoutExtension(GlobalMethod.lstABName[index]), 2);
         if (_OmitFolderName == null || !_OmitFolderName.Contains(stringRight))
         {
             if (GlobalMethod.AssetFileExist(GlobalMethod.lstABName[index], _strLoadFile, string.Empty))
             {
                 TextAsset textAsset = CommonLib.LoadAsset <TextAsset>(GlobalMethod.lstABName[index], _strLoadFile, false, string.Empty);
                 AssetBundleManager.UnloadAssetBundle(GlobalMethod.lstABName[index], true, (string)null, false);
                 if (!Object.op_Equality((Object)textAsset, (Object)null))
                 {
                     lst.Add(textAsset.get_text());
                 }
             }
         }
     }
     return(lst);
 }
コード例 #2
0
 public static T LoadAllFolderInOneFile <T>(
     string _findFolder,
     string _strLoadFile,
     List <string> _OmitFolderName = null)
     where T : Object
 {
     GlobalMethod.lstABName.Clear();
     GlobalMethod.lstABName = GlobalMethod.GetAssetBundleNameListFromPath(_findFolder, false);
     GlobalMethod.lstABName.Sort();
     for (int index = 0; index < GlobalMethod.lstABName.Count; ++index)
     {
         string stringRight = YS_Assist.GetStringRight(Path.GetFileNameWithoutExtension(GlobalMethod.lstABName[index]), 2);
         if (_OmitFolderName == null || !_OmitFolderName.Contains(stringRight))
         {
             if (GlobalMethod.AssetFileExist(GlobalMethod.lstABName[index].ToString(), _strLoadFile, string.Empty))
             {
                 T obj = CommonLib.LoadAsset <T>(GlobalMethod.lstABName[index], _strLoadFile, false, string.Empty);
                 AssetBundleManager.UnloadAssetBundle(GlobalMethod.lstABName[index], true, (string)null, false);
                 return(obj);
             }
         }
     }
     return((T)null);
 }
コード例 #3
0
    public bool Load(string _assetpath, string _file)
    {
        this.lstEyeNeck.Clear();
        if (_file == string.Empty)
        {
            return(false);
        }
        List <string> nameListFromPath = CommonLib.GetAssetBundleNameListFromPath(_assetpath, false);

        nameListFromPath.Sort();
        this.abName    = string.Empty;
        this.assetName = string.Empty;
        this.excelData = (ExcelData)null;
        this.info.Init();
        Vector3 zero = Vector3.get_zero();

        for (int index1 = 0; index1 < nameListFromPath.Count; ++index1)
        {
            this.abName    = nameListFromPath[index1];
            this.assetName = _file;
            if (GlobalMethod.AssetFileExist(this.abName, this.assetName, string.Empty))
            {
                this.excelData = CommonLib.LoadAsset <ExcelData>(this.abName, this.assetName, false, string.Empty);
                Singleton <HSceneManager> .Instance.hashUseAssetBundle.Add(this.abName);

                if (!Object.op_Equality((Object)this.excelData, (Object)null))
                {
                    int num1 = 3;
                    while (num1 < this.excelData.MaxCell)
                    {
                        this.row = this.excelData.list[num1++].list;
                        int num2 = 0;
                        this.info = new HMotionEyeNeckMale.EyeNeck();
                        this.info.Init();
                        if (this.row.Count != 0)
                        {
                            List <string> row1    = this.row;
                            int           index2  = num2;
                            int           num3    = index2 + 1;
                            string        element = row1.GetElement <string>(index2);
                            if (!element.IsNullOrEmpty())
                            {
                                this.info.anim = element;
                                ref HMotionEyeNeckMale.EyeNeck local1 = ref this.info;
                                List <string> row2   = this.row;
                                int           index3 = num3;
                                int           num4   = index3 + 1;
                                int           num5   = int.Parse(row2.GetElement <string>(index3));
                                local1.openEye = num5;
                                ref HMotionEyeNeckMale.EyeNeck local2 = ref this.info;
                                List <string> row3   = this.row;
                                int           index4 = num4;
                                int           num6   = index4 + 1;
                                int           num7   = int.Parse(row3.GetElement <string>(index4));
                                local2.openMouth = num7;
                                ref HMotionEyeNeckMale.EyeNeck local3 = ref this.info;
                                List <string> row4   = this.row;
                                int           index5 = num6;
                                int           num8   = index5 + 1;
                                int           num9   = int.Parse(row4.GetElement <string>(index5));
                                local3.eyebrow = num9;
                                ref HMotionEyeNeckMale.EyeNeck local4 = ref this.info;
                                List <string> row5   = this.row;
                                int           index6 = num8;
                                int           num10  = index6 + 1;
                                int           num11  = int.Parse(row5.GetElement <string>(index6));
                                local4.eye = num11;
                                ref HMotionEyeNeckMale.EyeNeck local5 = ref this.info;
                                List <string> row6   = this.row;
                                int           index7 = num10;
                                int           num12  = index7 + 1;
                                int           num13  = int.Parse(row6.GetElement <string>(index7));
                                local5.mouth = num13;
                                ref HMotionEyeNeckMale.EyeNeck local6 = ref this.info;
                                List <string> row7   = this.row;
                                int           index8 = num12;
                                int           num14  = index8 + 1;
                                int           num15  = int.Parse(row7.GetElement <string>(index8));
                                local6.Neckbehaviour = num15;
                                ref HMotionEyeNeckMale.EyeNeck local7 = ref this.info;
コード例 #4
0
    public bool Load(string _assetpath, string _file)
    {
        List <bool>[] boolListArray1 = new List <bool> [2];
        List <bool>[] boolListArray2 = new List <bool> [2];
        this.isInit = false;
        for (int index = 0; index < 2; ++index)
        {
            this.InitDynamicBoneReferenceBone(this.bonePtns[index], this.lstsTrans[index]);
            if (this.lstsRef[index] != null)
            {
                this.lstsRef[index].Clear();
            }
            boolListArray1[index] = new List <bool>();
            boolListArray1[index].Add(false);
            boolListArray2[index] = new List <bool>();
            boolListArray2[index].Add(false);
        }
        if (_file == string.Empty)
        {
            return(false);
        }
        this.sbAssetName.Clear();
        this.sbAssetName.Append(_file.Remove(3, 2));
        List <string> nameListFromPath = CommonLib.GetAssetBundleNameListFromPath(_assetpath, false);

        for (int index1 = 0; index1 < nameListFromPath.Count; ++index1)
        {
            if (!GlobalMethod.AssetFileExist(nameListFromPath[index1], this.sbAssetName.ToString(), string.Empty))
            {
                return(false);
            }
            ExcelData excelData = CommonLib.LoadAsset <ExcelData>(nameListFromPath[index1], this.sbAssetName.ToString(), false, string.Empty);
            Singleton <HSceneManager> .Instance.hashUseAssetBundle.Add(nameListFromPath[index1]);

            if (Object.op_Equality((Object)excelData, (Object)null))
            {
                return(false);
            }
            int num1 = 3;
            while (num1 < excelData.MaxCell)
            {
                int num2 = num1 - 3;
                this.row = excelData.list[num1++].list;
                int num3 = 2;
                DynamicBoneReferenceCtrl.Reference    reference;
                ref DynamicBoneReferenceCtrl.RateInfo local1 = ref reference.position;
                List <string> row1      = this.row;
                int           index2    = num3;
                int           num4      = index2 + 1;
                double        num5      = (double)float.Parse(row1.GetElement <string>(index2));
                List <string> row2      = this.row;
                int           index3    = num4;
                int           num6      = index3 + 1;
                double        num7      = (double)float.Parse(row2.GetElement <string>(index3));
                List <string> row3      = this.row;
                int           index4    = num6;
                int           num8      = index4 + 1;
                double        num9      = (double)float.Parse(row3.GetElement <string>(index4));
                Vector3       vector3_1 = new Vector3((float)num5, (float)num7, (float)num9);
                local1.sizeS = vector3_1;
                ref DynamicBoneReferenceCtrl.RateInfo local2 = ref reference.position;
                List <string> row4      = this.row;
                int           index5    = num8;
                int           num10     = index5 + 1;
                double        num11     = (double)float.Parse(row4.GetElement <string>(index5));
                List <string> row5      = this.row;
                int           index6    = num10;
                int           num12     = index6 + 1;
                double        num13     = (double)float.Parse(row5.GetElement <string>(index6));
                List <string> row6      = this.row;
                int           index7    = num12;
                int           num14     = index7 + 1;
                double        num15     = (double)float.Parse(row6.GetElement <string>(index7));
                Vector3       vector3_2 = new Vector3((float)num11, (float)num13, (float)num15);
                local2.sizeM = vector3_2;
                ref DynamicBoneReferenceCtrl.RateInfo local3 = ref reference.position;
コード例 #5
0
    public bool Load(string _assetpath, string _file)
    {
        this.lstEyeNeck.Clear();
        this.ChangeTimeEye   = 0.0f;
        this.nowleapSpeed[1] = 0.0f;
        this.BackUpEye[0]    = this.EyeTrs[0].get_localRotation();
        this.BackUpEye[1]    = this.EyeTrs[1].get_localRotation();
        this.ChangeTimeNeck  = 0.0f;
        this.nowleapSpeed[0] = 0.0f;
        this.BackUpNeck      = this.NeckTrs.get_localRotation();
        this.BackUpHead      = this.HeadTrs.get_localRotation();
        if (_file == string.Empty)
        {
            return(false);
        }
        List <string> nameListFromPath = CommonLib.GetAssetBundleNameListFromPath(_assetpath, false);

        nameListFromPath.Sort();
        this.abName    = string.Empty;
        this.assetName = string.Empty;
        this.excelData = (ExcelData)null;
        this.info.Init();
        Vector3 zero = Vector3.get_zero();

        for (int index1 = 0; index1 < nameListFromPath.Count; ++index1)
        {
            this.abName    = nameListFromPath[index1];
            this.assetName = _file;
            if (GlobalMethod.AssetFileExist(this.abName, this.assetName, string.Empty))
            {
                this.excelData = CommonLib.LoadAsset <ExcelData>(this.abName, this.assetName, false, string.Empty);
                Singleton <HSceneManager> .Instance.hashUseAssetBundle.Add(this.abName);

                if (!Object.op_Equality((Object)this.excelData, (Object)null))
                {
                    int num1 = 3;
                    while (num1 < this.excelData.MaxCell)
                    {
                        this.row = this.excelData.list[num1++].list;
                        int num2 = 0;
                        this.info = new HMotionEyeNeckLesPlayer.EyeNeck();
                        this.info.Init();
                        if (this.row.Count != 0)
                        {
                            List <string> row1    = this.row;
                            int           index2  = num2;
                            int           num3    = index2 + 1;
                            string        element = row1.GetElement <string>(index2);
                            if (!element.IsNullOrEmpty())
                            {
                                this.info.anim = element;
                                ref HMotionEyeNeckLesPlayer.EyeNeck local1 = ref this.info;
                                List <string> row2   = this.row;
                                int           index3 = num3;
                                int           num4   = index3 + 1;
                                int           num5   = row2.GetElement <string>(index3) == "1" ? 1 : 0;
                                local1.isConfigDisregardNeck = num5 != 0;
                                ref HMotionEyeNeckLesPlayer.EyeNeck local2 = ref this.info;
                                List <string> row3   = this.row;
                                int           index4 = num4;
                                int           num6   = index4 + 1;
                                int           num7   = row3.GetElement <string>(index4) == "1" ? 1 : 0;
                                local2.isConfigDisregardEye = num7 != 0;
                                float         result1 = 0.0f;
                                List <string> row4    = this.row;
                                int           index5  = num6;
                                int           num8    = index5 + 1;
                                if (!float.TryParse(row4.GetElement <string>(index5), out result1))
                                {
                                    result1 = 0.0f;
                                }
                                this.info.openEye = result1;
                                float         result2 = 0.0f;
                                List <string> row5    = this.row;
                                int           index6  = num8;
                                int           num9    = index6 + 1;
                                if (!float.TryParse(row5.GetElement <string>(index6), out result2))
                                {
                                    result2 = 0.0f;
                                }
                                this.info.openMouth = result2;
                                int           result3 = 0;
                                List <string> row6    = this.row;
                                int           index7  = num9;
                                int           num10   = index7 + 1;
                                if (!int.TryParse(row6.GetElement <string>(index7), out result3))
                                {
                                    result3 = 0;
                                }
                                this.info.eyeBlow = result3;
                                int           result4 = 0;
                                List <string> row7    = this.row;
                                int           index8  = num10;
                                int           num11   = index8 + 1;
                                if (!int.TryParse(row7.GetElement <string>(index8), out result4))
                                {
                                    result4 = 0;
                                }
                                this.info.eye = result4;
                                int           result5 = 0;
                                List <string> row8    = this.row;
                                int           index9  = num11;
                                int           num12   = index9 + 1;
                                if (!int.TryParse(row8.GetElement <string>(index9), out result5))
                                {
                                    result5 = 0;
                                }
                                this.info.mouth = result5;
                                float         result6 = 0.0f;
                                List <string> row9    = this.row;
                                int           index10 = num12;
                                int           num13   = index10 + 1;
                                if (!float.TryParse(row9.GetElement <string>(index10), out result6))
                                {
                                    result6 = 0.0f;
                                }
                                this.info.tear = result6;
                                float         result7 = 0.0f;
                                List <string> row10   = this.row;
                                int           index11 = num13;
                                int           num14   = index11 + 1;
                                if (!float.TryParse(row10.GetElement <string>(index11), out result7))
                                {
                                    result7 = 0.0f;
                                }
                                this.info.cheek = result7;
                                ref HMotionEyeNeckLesPlayer.EyeNeck local3 = ref this.info;
                                List <string> row11   = this.row;
                                int           index12 = num14;
                                int           num15   = index12 + 1;
                                int           num16   = row11.GetElement <string>(index12) == "1" ? 1 : 0;
                                local3.blink = num16 != 0;
                                ref HMotionEyeNeckLesPlayer.EyeNeckFace local4 = ref this.info.faceinfo;
                                List <string> row12   = this.row;
                                int           index13 = num15;
                                int           num17   = index13 + 1;
                                int           num18   = int.Parse(row12.GetElement <string>(index13));
                                local4.Neckbehaviour = num18;
                                ref HMotionEyeNeckLesPlayer.EyeNeckFace local5 = ref this.info.faceinfo;
                                List <string> row13   = this.row;
                                int           index14 = num17;
                                int           num19   = index14 + 1;
                                int           num20   = int.Parse(row13.GetElement <string>(index14));
                                local5.Eyebehaviour = num20;
                                ref HMotionEyeNeckLesPlayer.EyeNeckFace local6 = ref this.info.faceinfo;
                                List <string> row14   = this.row;
                                int           index15 = num19;
                                int           num21   = index15 + 1;
                                int           num22   = int.Parse(row14.GetElement <string>(index15));
                                local6.targetNeck = num22;
                                List <string> row15   = this.row;
                                int           index16 = num21;
                                int           num23   = index16 + 1;
                                // ISSUE: cast to a reference type
                                if (!float.TryParse(row15.GetElement <string>(index16), (float&)ref zero.x))
                                {
                                    zero.x = (__Null)0.0;
                                }
                                List <string> row16   = this.row;
                                int           index17 = num23;
                                int           num24   = index17 + 1;
                                // ISSUE: cast to a reference type
                                if (!float.TryParse(row16.GetElement <string>(index17), (float&)ref zero.y))
                                {
                                    zero.y = (__Null)0.0;
                                }
                                List <string> row17   = this.row;
                                int           index18 = num24;
                                int           num25   = index18 + 1;
                                // ISSUE: cast to a reference type
                                if (!float.TryParse(row17.GetElement <string>(index18), (float&)ref zero.z))
                                {
                                    zero.z = (__Null)0.0;
                                }
                                this.info.faceinfo.NeckRot[0] = zero;
                                List <string> row18   = this.row;
                                int           index19 = num25;
                                int           num26   = index19 + 1;
                                // ISSUE: cast to a reference type
                                if (!float.TryParse(row18.GetElement <string>(index19), (float&)ref zero.x))
                                {
                                    zero.x = (__Null)0.0;
                                }
                                List <string> row19   = this.row;
                                int           index20 = num26;
                                int           num27   = index20 + 1;
                                // ISSUE: cast to a reference type
                                if (!float.TryParse(row19.GetElement <string>(index20), (float&)ref zero.y))
                                {
                                    zero.y = (__Null)0.0;
                                }
                                List <string> row20   = this.row;
                                int           index21 = num27;
                                int           num28   = index21 + 1;
                                // ISSUE: cast to a reference type
                                if (!float.TryParse(row20.GetElement <string>(index21), (float&)ref zero.z))
                                {
                                    zero.z = (__Null)0.0;
                                }
                                this.info.faceinfo.NeckRot[1] = zero;
                                List <string> row21   = this.row;
                                int           index22 = num28;
                                int           num29   = index22 + 1;
                                // ISSUE: cast to a reference type
                                if (!float.TryParse(row21.GetElement <string>(index22), (float&)ref zero.x))
                                {
                                    zero.x = (__Null)0.0;
                                }
                                List <string> row22   = this.row;
                                int           index23 = num29;
                                int           num30   = index23 + 1;
                                // ISSUE: cast to a reference type
                                if (!float.TryParse(row22.GetElement <string>(index23), (float&)ref zero.y))
                                {
                                    zero.y = (__Null)0.0;
                                }
                                List <string> row23   = this.row;
                                int           index24 = num30;
                                int           num31   = index24 + 1;
                                // ISSUE: cast to a reference type
                                if (!float.TryParse(row23.GetElement <string>(index24), (float&)ref zero.z))
                                {
                                    zero.z = (__Null)0.0;
                                }
                                this.info.faceinfo.HeadRot[0] = zero;
                                List <string> row24   = this.row;
                                int           index25 = num31;
                                int           num32   = index25 + 1;
                                // ISSUE: cast to a reference type
                                if (!float.TryParse(row24.GetElement <string>(index25), (float&)ref zero.x))
                                {
                                    zero.x = (__Null)0.0;
                                }
                                List <string> row25   = this.row;
                                int           index26 = num32;
                                int           num33   = index26 + 1;
                                // ISSUE: cast to a reference type
                                if (!float.TryParse(row25.GetElement <string>(index26), (float&)ref zero.y))
                                {
                                    zero.y = (__Null)0.0;
                                }
                                List <string> row26   = this.row;
                                int           index27 = num33;
                                int           num34   = index27 + 1;
                                // ISSUE: cast to a reference type
                                if (!float.TryParse(row26.GetElement <string>(index27), (float&)ref zero.z))
                                {
                                    zero.z = (__Null)0.0;
                                }
                                this.info.faceinfo.HeadRot[1] = zero;
                                ref HMotionEyeNeckLesPlayer.EyeNeckFace local7 = ref this.info.faceinfo;
コード例 #6
0
ファイル: HSeCtrl.cs プロジェクト: request-time-out/A-Scripts
    public bool Load(
        string _strAssetFolder,
        string _file,
        GameObject _objBoneMale,
        params GameObject[] _objBoneFemale)
    {
        this.lstInfo.Clear();
        this.dicLoop.Clear();
        this.oldnameHash      = 0;
        this.oldNormalizeTime = 0.0f;
        this.excelData        = (ExcelData)null;
        Singleton <Manager.Sound> .Instance.Stop(Manager.Sound.Type.GameSE3D);

        if (_file == string.Empty)
        {
            return(false);
        }
        GameObject[] gameObjectArray;
        if (_objBoneFemale.Length > 1)
        {
            gameObjectArray = new GameObject[3]
            {
                _objBoneMale,
                _objBoneFemale[0],
                _objBoneFemale[1]
            }
        }
        ;
        else
        {
            gameObjectArray = new GameObject[2]
            {
                _objBoneMale,
                _objBoneFemale[0]
            }
        };
        List <string> nameListFromPath = CommonLib.GetAssetBundleNameListFromPath(_strAssetFolder, false);

        nameListFromPath.Sort();
        this.assetName = _file;
        for (int index1 = 0; index1 < nameListFromPath.Count; ++index1)
        {
            this.abName = nameListFromPath[index1];
            if (GlobalMethod.AssetFileExist(this.abName, this.assetName, string.Empty))
            {
                this.excelData = CommonLib.LoadAsset <ExcelData>(this.abName, this.assetName, false, string.Empty);
                Singleton <HSceneManager> .Instance.hashUseAssetBundle.Add(this.abName);

                if (!Object.op_Equality((Object)this.excelData, (Object)null))
                {
                    int num1 = 1;
                    while (num1 < this.excelData.MaxCell)
                    {
                        this.row = this.excelData.list[num1++].list;
                        int           num2   = 0;
                        List <string> row1   = this.row;
                        int           index2 = num2;
                        int           num3   = index2 + 1;
                        this.nameAnim = row1.GetElement <string>(index2);
                        List <string>       row2     = this.row;
                        int                 index3   = num3;
                        int                 num4     = index3 + 1;
                        int                 index4   = int.Parse(row2.GetElement <string>(index3));
                        ref HSeCtrl.KeyInfo local1   = ref this.infoKey;
                        List <string>       row3     = this.row;
                        int                 index5   = num4;
                        int                 num5     = index5 + 1;
                        string              element1 = row3.GetElement <string>(index5);
                        local1.objParentName = element1;
                        gameObjectArray[index4].SafeProc <GameObject>((Action <GameObject>)(o =>
                        {
                            if (!Object.op_Inequality((Object)o, (Object)null))
                            {
                                return;
                            }
                            this.infoKey.objParent = o.get_transform().FindLoop(this.infoKey.objParentName);
                        }));
                        ref HSeCtrl.KeyInfo local2 = ref this.infoKey;
                        List <string>       row4   = this.row;
                        int    index6 = num5;
                        int    num6   = index6 + 1;
                        double num7   = (double)float.Parse(row4.GetElement <string>(index6));
                        local2.key = (float)num7;
                        ref HSeCtrl.KeyInfo local3 = ref this.infoKey;
                        List <string>       row5   = this.row;
                        int index7 = num6;
                        int num8   = index7 + 1;
                        int num9   = row5.GetElement <string>(index7) == "1" ? 1 : 0;
                        local3.isLoop = num9 != 0;
                        ref HSeCtrl.KeyInfo local4 = ref this.infoKey;
                        List <string>       row6   = this.row;
                        int index8 = num8;
                        int num10  = index8 + 1;
                        int num11  = !(row6.GetElement <string>(index8) == "1") ? 0 : 1;
                        local4.loopSwitch = num11;
                        ref HSeCtrl.KeyInfo local5 = ref this.infoKey;
                        List <string>       row7   = this.row;
                        int index9 = num10;
                        int num12  = index9 + 1;
                        int num13  = row7.GetElement <string>(index9) == "1" ? 1 : 0;
                        local5.bChangeVol = num13 != 0;
                        ref HSeCtrl.KeyInfo local6 = ref this.infoKey;
コード例 #7
0
    public bool Load(string _assetpath, string _file, int _id)
    {
        this.lstPaste.Clear();
        if (_file == string.Empty)
        {
            return(false);
        }
        List <string> nameListFromPath = CommonLib.GetAssetBundleNameListFromPath(_assetpath, false);

        nameListFromPath.Sort();
        this.asset.Clear();
        this.asset.Append(_file);
        this.excelData = (ExcelData)null;
        for (int index1 = 0; index1 < nameListFromPath.Count; ++index1)
        {
            this.abName.Clear();
            this.abName.Append(nameListFromPath[index1]);
            if (GlobalMethod.AssetFileExist(this.abName.ToString(), this.asset.ToString(), string.Empty))
            {
                this.excelData = CommonLib.LoadAsset <ExcelData>(this.abName.ToString(), this.asset.ToString(), false, string.Empty);
                Singleton <HSceneManager> .Instance.hashUseAssetBundle.Add(this.abName.ToString());

                if (!Object.op_Equality((Object)this.excelData, (Object)null))
                {
                    int num1 = 1;
                    while (num1 < this.excelData.MaxCell)
                    {
                        this.row = this.excelData.list[num1++].list;
                        int num2 = 1;
                        SiruPasteCtrl.PasteInfo pasteInfo1 = new SiruPasteCtrl.PasteInfo();
                        SiruPasteCtrl.PasteInfo pasteInfo2 = pasteInfo1;
                        List <string>           row1       = this.row;
                        int    index2  = num2;
                        int    num3    = index2 + 1;
                        string element = row1.GetElement <string>(index2);
                        pasteInfo2.anim   = element;
                        pasteInfo1.timing = new SiruPasteCtrl.Timing();
                        SiruPasteCtrl.Timing timing = pasteInfo1.timing;
                        List <string>        row2   = this.row;
                        int    index3 = num3;
                        int    num4   = index3 + 1;
                        double num5   = (double)float.Parse(row2.GetElement <string>(index3));
                        timing.normalizeTime = (float)num5;
                        List <string> row3   = this.row;
                        int           index4 = num4;
                        int           num6   = index4 + 1;
                        this.astr = row3.GetElement <string>(index4).Split(',');
                        for (int index5 = 0; index5 < this.astr.Length; ++index5)
                        {
                            int result = 0;
                            if (!int.TryParse(this.astr[index5], out result))
                            {
                                result = 0;
                            }
                            pasteInfo1.timing.lstWhere.Add(result);
                        }
                        this.lstPaste.Add(pasteInfo1);
                    }
                }
            }
        }
        this.oldFrame = 0.0f;
        this.oldHash  = 0;
        return(true);
    }
コード例 #8
0
    public Masturbation(DeliveryMember _delivery)
        : base(_delivery)
    {
        this.animPar.heights = new float[1];
        this.aTimer[0]       = new RandomTimer();
        this.aTimer[1]       = new RandomTimer();
        this.Timers          = new float[2][]
        {
            new float[2],
            new float[2]
        };
        string assetHautoListFolder = Singleton <HSceneManager> .Instance.strAssetHAutoListFolder;
        string str1 = "masturbation";

        if (!GlobalMethod.AssetFileExist(assetHautoListFolder, str1, string.Empty))
        {
            return;
        }
        ExcelData excelData = CommonLib.LoadAsset <ExcelData>(assetHautoListFolder, str1, false, string.Empty);

        Singleton <HSceneManager> .Instance.hashUseAssetBundle.Add(assetHautoListFolder);

        if (Object.op_Equality((Object)excelData, (Object)null))
        {
            return;
        }
        int num1 = 2;

        while (num1 < excelData.MaxCell)
        {
            this.row.Clear();
            foreach (string str2 in excelData.list[num1++].list)
            {
                this.row.Add(str2);
            }
            int           num2      = 0;
            float[][]     timers1   = this.Timers;
            float[]       numArray1 = new float[2];
            List <string> row1      = this.row;
            int           index1    = num2;
            int           num3      = index1 + 1;
            numArray1[0] = float.Parse(row1.GetElement <string>(index1));
            List <string> row2   = this.row;
            int           index2 = num3;
            int           num4   = index2 + 1;
            numArray1[1] = float.Parse(row2.GetElement <string>(index2));
            timers1[0]   = numArray1;
            float[][]     timers2   = this.Timers;
            float[]       numArray2 = new float[2];
            List <string> row3      = this.row;
            int           index3    = num4;
            int           num5      = index3 + 1;
            numArray2[0] = float.Parse(row3.GetElement <string>(index3));
            List <string> row4   = this.row;
            int           index4 = num5;
            int           num6   = index4 + 1;
            numArray2[1] = float.Parse(row4.GetElement <string>(index4));
            timers2[1]   = numArray2;
            this.aTimer[0].Init(this.Timers[0][0], this.Timers[0][0]);
            this.aTimer[1].Init(this.Timers[1][1], this.Timers[1][1]);
        }
        this.CatID = 4;
    }
コード例 #9
0
    public static List <ExcelData.Param> LoadExcelData(
        string _strAssetPath,
        string _strFileName,
        int sCell,
        int sRow,
        int eCell,
        int eRow,
        bool _isWarning = true)
    {
        if (!GlobalMethod.AssetFileExist(_strAssetPath, _strFileName, string.Empty))
        {
            if (_isWarning)
            {
                GlobalMethod.DebugLog("excel : [" + _strAssetPath + "][" + _strFileName + "]は見つかりません", 1);
            }
            return((List <ExcelData.Param>)null);
        }
        AssetBundleLoadAssetOperation loadAssetOperation = AssetBundleManager.LoadAsset(_strAssetPath, _strFileName, typeof(ExcelData), (string)null);

        AssetBundleManager.UnloadAssetBundle(_strAssetPath, true, (string)null, false);
        if (loadAssetOperation.IsEmpty())
        {
            if (_isWarning)
            {
                GlobalMethod.DebugLog("excel : [" + _strFileName + "]は[" + _strAssetPath + "]の中に入っていません", 1);
            }
            return((List <ExcelData.Param>)null);
        }
        GlobalMethod.excelData = loadAssetOperation.GetAsset <ExcelData>();
        GlobalMethod.cell.Clear();
        foreach (ExcelData.Param obj in GlobalMethod.excelData.list)
        {
            GlobalMethod.cell.Add(obj.list[sCell]);
        }
        GlobalMethod.row.Clear();
        foreach (string str in GlobalMethod.excelData.list[sRow].list)
        {
            GlobalMethod.row.Add(str);
        }
        List <string> cell1 = GlobalMethod.cell;
        List <string> row1  = GlobalMethod.row;

        ExcelData.Specify specify1 = new ExcelData.Specify(eCell, eRow);
        ExcelData.Specify specify2 = new ExcelData.Specify(cell1.Count, row1.Count);
        GlobalMethod.excelParams.Clear();
        if ((long)(uint)specify1.cell > (long)specify2.cell || (long)(uint)specify1.row > (long)specify2.row)
        {
            return((List <ExcelData.Param>)null);
        }
        if (specify1.cell < GlobalMethod.excelData.list.Count)
        {
            for (int cell2 = specify1.cell; cell2 < GlobalMethod.excelData.list.Count && cell2 <= specify2.cell; ++cell2)
            {
                ExcelData.Param obj = new ExcelData.Param();
                if (specify1.row < GlobalMethod.excelData.list[cell2].list.Count)
                {
                    obj.list = new List <string>();
                    for (int row2 = specify1.row; row2 < GlobalMethod.excelData.list[cell2].list.Count && row2 <= specify2.row; ++row2)
                    {
                        obj.list.Add(GlobalMethod.excelData.list[cell2].list[row2]);
                    }
                }
                GlobalMethod.excelParams.Add(obj);
            }
        }
        return(GlobalMethod.excelParams);
    }
コード例 #10
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];
コード例 #11
0
    public void AIRead(string abName, string assetName, bool add = false)
    {
        if (!GlobalMethod.AssetFileExist(abName, assetName, string.Empty))
        {
            return;
        }
        this.data = (ExcelData)null;
        this.data = CommonLib.LoadAsset <ExcelData>(abName, assetName, false, string.Empty);
        Singleton <HSceneManager> .Instance.hashUseAssetBundle.Add(abName);

        if (Object.op_Equality((Object)this.data, (Object)null))
        {
            return;
        }
        int length  = this.data.list[1].list.Count - 4;
        int num1    = 0;
        int maxCell = this.data.MaxCell;

        MotionIKData.State[] stateArray;
        if (!add)
        {
            stateArray = new MotionIKData.State[length];
        }
        else
        {
            num1       = this.states.Length;
            stateArray = new MotionIKData.State[length + num1];
            for (int index = 0; index < num1; ++index)
            {
                stateArray[index] = new MotionIKData.State(this.states[index]);
            }
        }
        string empty1 = string.Empty;
        string empty2 = string.Empty;
        string empty3 = string.Empty;

        for (int index1 = 0; index1 < length; ++index1)
        {
            int num2   = index1;
            int index2 = num2;
            if (add)
            {
                index2 += num1;
            }
            stateArray[index2]        = new MotionIKData.State();
            stateArray[index2].frames = new MotionIKData.Frame[FrameCorrect.FrameNames.Length + 8];
            int  index3 = -1;
            int  index4 = -1;
            int  index5 = -1;
            bool flag1  = true;
            int  num3   = 1;
            while (num3 < maxCell)
            {
                this.row = this.data.list[num3++].list;
                int    count  = this.row.Count;
                int    index6 = 4 + num2;
                string str    = index6 >= count ? (string)null : this.row[index6];
                bool   flag2  = str.IsNullOrEmpty();
                int    num4;
                if (num3 < 28)
                {
                    string key = index6 >= count ? (string)null : this.row[3];
                    if (key != null)
                    {
                        // ISSUE: reference to a compiler-generated field
                        if (MotionIKData.\u003C\u003Ef__switch\u0024mapB == null)
                        {
                            // ISSUE: reference to a compiler-generated field
                            MotionIKData.\u003C\u003Ef__switch\u0024mapB = new Dictionary <string, int>(7)
                            {
                                {
                                    "anime name",
                                    0
                                },
                                {
                                    "sex",
                                    1
                                },
                                {
                                    "target",
                                    2
                                },
                                {
                                    "chain",
                                    3
                                },
                                {
                                    "weight pos",
                                    4
                                },
                                {
                                    "weight rot",
                                    5
                                },
                                {
                                    "weight",
                                    6
                                }
                            };
                        }
                        // ISSUE: reference to a compiler-generated field
                        if (MotionIKData.\u003C\u003Ef__switch\u0024mapB.TryGetValue(key, out num4))
                        {
                            switch (num4)
                            {
                            case 0:
                                stateArray[index2].name = str;
                                continue;

                            case 1:
                                ++index3;
                                if ((index6 >= count ? (string)null : this.row[0]) != string.Empty)
                                {
                                    int.TryParse(str, out stateArray[index2].parts[index3].param2.sex);
                                    continue;
                                }
                                continue;

                            case 2:
                                stateArray[index2].parts[index3].param2.target = str;
                                continue;

                            case 3:
                                stateArray[index2].parts[index3].param3.chein = str;
                                continue;

                            case 4:
                                float.TryParse(str, out stateArray[index2].parts[index3].param2.weightPos);
                                continue;

                            case 5:
                                float.TryParse(str, out stateArray[index2].parts[index3].param2.weightAng);
                                continue;

                            case 6:
                                float.TryParse(str, out stateArray[index2].parts[index3].param3.weight);
                                continue;

                            default:
                                continue;
                            }
                        }
                    }
                }
                else if (num3 < 86)
                {
                    ++index4;
                    if (!flag2)
                    {
                        int.TryParse(str, out stateArray[index2].frames[index4].editNo);
                    }
                    stateArray[index2].frames[index4].frameNo = index4;
                    stateArray[index2].frames[index4].shapes  = new MotionIKData.Shape[ChaFileDefine.cf_bodyshapename.Length];
                    index5 = -1;
                }
                else
                {
                    string key = count <= 3 ? (string)null : this.row[3];
                    if (key != null)
                    {
                        // ISSUE: reference to a compiler-generated field
                        if (MotionIKData.\u003C\u003Ef__switch\u0024mapC == null)
                        {
                            // ISSUE: reference to a compiler-generated field
                            MotionIKData.\u003C\u003Ef__switch\u0024mapC = new Dictionary <string, int>(9)
                            {
                                {
                                    "Sx",
                                    0
                                },
                                {
                                    "Sy",
                                    1
                                },
                                {
                                    "Sz",
                                    2
                                },
                                {
                                    "Mx",
                                    3
                                },
                                {
                                    "My",
                                    4
                                },
                                {
                                    "Mz",
                                    5
                                },
                                {
                                    "Lx",
                                    6
                                },
                                {
                                    "Ly",
                                    7
                                },
                                {
                                    "Lz",
                                    8
                                }
                            };
                        }
                        // ISSUE: reference to a compiler-generated field
                        if (MotionIKData.\u003C\u003Ef__switch\u0024mapC.TryGetValue(key, out num4))
                        {
                            switch (num4)
                            {
                            case 0:
                                if (flag1)
                                {
                                    if ((count <= 0 ? (string)null : this.row[0]) != string.Empty)
                                    {
                                        ++index4;
                                        index5 = -1;
                                    }
                                    ++index5;
                                    stateArray[index2].frames[index4].shapes[index5].shapeNo = index5;
                                }
                                if (!flag2)
                                {
                                    if (flag1)
                                    {
                                        // ISSUE: cast to a reference type
                                        float.TryParse(str, (float&)ref stateArray[index2].frames[index4].shapes[index5].small.pos.x);
                                        continue;
                                    }
                                    // ISSUE: cast to a reference type
                                    float.TryParse(str, (float&)ref stateArray[index2].frames[index4].shapes[index5].small.ang.x);
                                    continue;
                                }
                                continue;

                            case 1:
                                if (!flag2)
                                {
                                    if (flag1)
                                    {
                                        // ISSUE: cast to a reference type
                                        float.TryParse(str, (float&)ref stateArray[index2].frames[index4].shapes[index5].small.pos.y);
                                        continue;
                                    }
                                    // ISSUE: cast to a reference type
                                    float.TryParse(str, (float&)ref stateArray[index2].frames[index4].shapes[index5].small.ang.y);
                                    continue;
                                }
                                continue;

                            case 2:
                                if (!flag2)
                                {
                                    if (flag1)
                                    {
                                        // ISSUE: cast to a reference type
                                        float.TryParse(str, (float&)ref stateArray[index2].frames[index4].shapes[index5].small.pos.z);
                                        continue;
                                    }
                                    // ISSUE: cast to a reference type
                                    float.TryParse(str, (float&)ref stateArray[index2].frames[index4].shapes[index5].small.ang.z);
                                    continue;
                                }
                                continue;

                            case 3:
                                if (!flag2)
                                {
                                    if (flag1)
                                    {
                                        // ISSUE: cast to a reference type
                                        float.TryParse(str, (float&)ref stateArray[index2].frames[index4].shapes[index5].mediam.pos.x);
                                        continue;
                                    }
                                    // ISSUE: cast to a reference type
                                    float.TryParse(str, (float&)ref stateArray[index2].frames[index4].shapes[index5].mediam.ang.x);
                                    continue;
                                }
                                continue;

                            case 4:
                                if (!flag2)
                                {
                                    if (flag1)
                                    {
                                        // ISSUE: cast to a reference type
                                        float.TryParse(str, (float&)ref stateArray[index2].frames[index4].shapes[index5].mediam.pos.y);
                                        continue;
                                    }
                                    // ISSUE: cast to a reference type
                                    float.TryParse(str, (float&)ref stateArray[index2].frames[index4].shapes[index5].mediam.ang.y);
                                    continue;
                                }
                                continue;

                            case 5:
                                if (!flag2)
                                {
                                    if (flag1)
                                    {
                                        // ISSUE: cast to a reference type
                                        float.TryParse(str, (float&)ref stateArray[index2].frames[index4].shapes[index5].mediam.pos.z);
                                        continue;
                                    }
                                    // ISSUE: cast to a reference type
                                    float.TryParse(str, (float&)ref stateArray[index2].frames[index4].shapes[index5].mediam.ang.z);
                                    continue;
                                }
                                continue;

                            case 6:
                                if (!flag2)
                                {
                                    if (flag1)
                                    {
                                        // ISSUE: cast to a reference type
                                        float.TryParse(str, (float&)ref stateArray[index2].frames[index4].shapes[index5].large.pos.x);
                                        continue;
                                    }
                                    // ISSUE: cast to a reference type
                                    float.TryParse(str, (float&)ref stateArray[index2].frames[index4].shapes[index5].large.ang.x);
                                    continue;
                                }
                                continue;

                            case 7:
                                if (!flag2)
                                {
                                    if (flag1)
                                    {
                                        // ISSUE: cast to a reference type
                                        float.TryParse(str, (float&)ref stateArray[index2].frames[index4].shapes[index5].large.pos.y);
                                        continue;
                                    }
                                    // ISSUE: cast to a reference type
                                    float.TryParse(str, (float&)ref stateArray[index2].frames[index4].shapes[index5].large.ang.y);
                                    continue;
                                }
                                continue;

                            case 8:
                                if (!flag2)
                                {
                                    if (flag1)
                                    {
                                        // ISSUE: cast to a reference type
                                        float.TryParse(str, (float&)ref stateArray[index2].frames[index4].shapes[index5].large.pos.z);
                                    }
                                    else
                                    {
                                        // ISSUE: cast to a reference type
                                        float.TryParse(str, (float&)ref stateArray[index2].frames[index4].shapes[index5].large.ang.z);
                                    }
                                }
                                flag1 = ((flag1 ? 1 : 0) ^ 1) != 0;
                                continue;
                            }
                        }
                    }
                    if ((count <= 0 ? (string)null : this.row[0]) == "フレーム")
                    {
                        index4 = -1;
                    }
                }
            }
        }
        this.states = new MotionIKData.State[stateArray.Length];
        for (int index = 0; index < stateArray.Length; ++index)
        {
            this.states[index] = stateArray[index];
        }
    }
コード例 #12
0
    public bool LoadItem(
        int _mode,
        int _id,
        GameObject _boneMale,
        GameObject _boneFemale,
        GameObject _boneMale1,
        GameObject _boneFemale1)
    {
        this.ReleaseItem();
        List <HItemCtrl.ListItem> listItemList = (List <HItemCtrl.ListItem>)null;

        this.itemObj.Clear();
        for (int index = 0; index < this.lstParent[_mode].Count; ++index)
        {
            if (this.lstParent[_mode][index].ContainsKey(_id))
            {
                listItemList = this.lstParent[_mode][index][_id];
                foreach (HItemCtrl.ListItem _info in listItemList)
                {
                    HItemCtrl.Item obj = new HItemCtrl.Item();
                    if (GlobalMethod.AssetFileExist(_info.pathAssetObject, _info.nameObject, _info.nameManifest))
                    {
                        obj.itemName  = _info.Name;
                        obj.objItem   = CommonLib.LoadAsset <GameObject>(_info.pathAssetObject, _info.nameObject, true, _info.nameManifest);
                        obj.transItem = obj.objItem.get_transform();
                        Singleton <HSceneManager> .Instance.hashUseAssetBundle.Add(_info.pathAssetObject);

                        this.LoadAnimation(obj, _info);
                        this.lstItem.Add(obj);
                    }
                }
            }
        }
        if (listItemList == null)
        {
            return(false);
        }
        for (int index1 = 0; index1 < listItemList.Count && this.lstItem.Count > index1; ++index1)
        {
            if (!Object.op_Equality((Object)this.lstItem[index1].objItem, (Object)null))
            {
                foreach (HItemCtrl.ParentInfo parentInfo in listItemList[index1].lstParent)
                {
                    GameObject gameObject1 = (GameObject)null;
                    if (parentInfo.numToWhomParent == 0)
                    {
                        if (Object.op_Inequality((Object)_boneMale, (Object)null))
                        {
                            gameObject1 = _boneMale.get_transform().FindLoop(parentInfo.nameParent);
                        }
                    }
                    else if (parentInfo.numToWhomParent == 1)
                    {
                        if (Object.op_Inequality((Object)_boneFemale, (Object)null))
                        {
                            gameObject1 = _boneFemale.get_transform().FindLoop(parentInfo.nameParent);
                        }
                    }
                    else if (parentInfo.numToWhomParent == 2)
                    {
                        if (Object.op_Inequality((Object)_boneMale1, (Object)null))
                        {
                            gameObject1 = _boneMale1.get_transform().FindLoop(parentInfo.nameParent);
                        }
                    }
                    else if (parentInfo.numToWhomParent == 3)
                    {
                        if (Object.op_Inequality((Object)_boneFemale1, (Object)null))
                        {
                            gameObject1 = _boneFemale1.get_transform().FindLoop(parentInfo.nameParent);
                        }
                    }
                    else
                    {
                        int index2 = parentInfo.numToWhomParent - 4;
                        if (this.lstItem.Count > index2 && Object.op_Implicit((Object)this.lstItem[index2].objItem))
                        {
                            gameObject1 = this.lstItem[index2].transItem.FindLoop(parentInfo.nameParent);
                        }
                    }
                    GameObject gameObject2 = !(parentInfo.nameSelf != string.Empty) ? this.lstItem[index1].objItem : this.lstItem[index1].transItem.FindLoop(parentInfo.nameSelf);
                    if (!Object.op_Equality((Object)gameObject1, (Object)null) && !Object.op_Equality((Object)gameObject2, (Object)null))
                    {
                        HItemCtrl.ChildInfo childInfo = new HItemCtrl.ChildInfo();
                        childInfo.objChild   = gameObject2;
                        childInfo.transChild = gameObject2.get_transform();
                        childInfo.oldParent  = gameObject2.get_transform().get_parent();
                        this.lstItem[index1].lstChild.Add(childInfo);
                        if (parentInfo.isParentMode)
                        {
                            childInfo.transChild.SetParent(gameObject1.get_transform(), false);
                            childInfo.transChild.set_localPosition(Vector3.get_zero());
                            childInfo.transChild.set_localRotation(Quaternion.get_identity());
                        }
                        else
                        {
                            childInfo.transChild.SetParent(this.hitemPlace, false);
                            childInfo.transChild.set_position(gameObject1.get_transform().get_position());
                            childInfo.transChild.set_rotation(gameObject1.get_transform().get_rotation());
                        }
                        if (!parentInfo.isParentScale)
                        {
                            this.itemObj.Add(new ValueTuple <Transform, Transform, bool>(childInfo.transChild, gameObject1.get_transform(), parentInfo.isParentMode));
                        }
                    }
                }
            }
        }
        GC.Collect();
        return(true);
    }