Esempio n. 1
0
 public bool Add(HAutoCtrl.AutoRandom.AutoRandomDate _date, float _rate)
 {
     if ((double)_rate == 0.0)
     {
         GlobalMethod.DebugLog("ランダム 追加登録個数が0", 0);
         return(false);
     }
     if (this.checks.Exists((Predicate <HAutoCtrl.AutoRandom.CCheck>)(i => i.date.mode == _date.mode && i.date.id == _date.id)))
     {
         GlobalMethod.DebugLog("ランダム 重複登録", 0);
         return(false);
     }
     this.backup.Add(new HAutoCtrl.AutoRandom.CCheck()
     {
         date = _date,
         rate = _rate
     });
     this.RandomSort();
     this.allVal = 0.0f;
     foreach (HAutoCtrl.AutoRandom.CCheck check in this.checks)
     {
         check.minVal = this.allVal;
         check.maxVal = this.allVal + check.rate;
         this.allVal += check.rate;
     }
     return(true);
 }
Esempio n. 2
0
    public static string LoadAllListText(List <string> _lstAssetBundleNames, string _strLoadFile)
    {
        StringBuilder stringBuilder = new StringBuilder();

        for (int index1 = 0; index1 < _lstAssetBundleNames.Count; ++index1)
        {
            string[] allAssetName = AssetBundleCheck.GetAllAssetName(_lstAssetBundleNames[index1], false, (string)null, false);
            bool     flag         = false;
            for (int index2 = 0; index2 < allAssetName.Length; ++index2)
            {
                if (allAssetName[index2].Compare(_strLoadFile, true))
                {
                    flag = true;
                    break;
                }
            }
            if (!flag)
            {
                GlobalMethod.DebugLog("[" + _lstAssetBundleNames[index1] + "][" + _strLoadFile + "]は見つかりません", 1);
            }
            else
            {
                TextAsset textAsset = CommonLib.LoadAsset <TextAsset>(_lstAssetBundleNames[index1], _strLoadFile, false, string.Empty);
                AssetBundleManager.UnloadAssetBundle(_lstAssetBundleNames[index1], true, (string)null, false);
                if (!Object.op_Equality((Object)textAsset, (Object)null))
                {
                    stringBuilder.Append(textAsset.get_text());
                }
            }
        }
        return(stringBuilder.ToString());
    }
Esempio n. 3
0
        public static void ChangeADVFixedAngleCamera(Actor actor, int attitudeID)
        {
            PlayerActor player = Singleton <Map> .Instance.Player;

            ObservableExtensions.Subscribe <long>(Observable.Take <long>((IObservable <M0>)Observable.EveryLateUpdate(), 1), (Action <M0>)(_ =>
            {
                GameObject loop = ((Component)actor.ChaControl.animBody).get_transform().FindLoop("cf_J_Mune00");
                if (Object.op_Inequality((Object)loop, (Object)null))
                {
                    Transform advNotStandRoot = player.CameraControl.ADVNotStandRoot;
                    advNotStandRoot.set_position(loop.get_transform().get_position());
                    advNotStandRoot.set_rotation(actor.Rotation);
                    if (Object.op_Inequality((Object)player.CameraControl.VanishControl, (Object)null))
                    {
                        player.CameraControl.VanishControl.LookAtPosition = loop.get_transform().get_position();
                    }
                }
                ABInfoData.Param obj;
                if (!Singleton <Resources> .Instance.Action.ComCameraList.TryGetValue(attitudeID, out obj))
                {
                    return;
                }
                string text = CommonLib.LoadAsset <TextAsset>(obj.AssetBundle, obj.AssetFile, false, string.Empty)?.get_text();
                if (text.IsNullOrEmpty())
                {
                    GlobalMethod.DebugLog("cameraファイルが読み込めません", 1);
                }
                else
                {
                    string[][] data;
                    GlobalMethod.GetListString(text, out data);
                    Vector3 vector3;
                    float result1;
                    vector3.x = !float.TryParse(data[0][0], out result1) ? (__Null)0.0 : (__Null)(double)result1;
                    vector3.y = !float.TryParse(data[1][0], out result1) ? (__Null)0.0 : (__Null)(double)result1;
                    vector3.z = !float.TryParse(data[2][0], out result1) ? (__Null)0.0 : (__Null)(double)result1;
                    Quaternion quaternion;
                    quaternion.x = !float.TryParse(data[3][0], out result1) ? (__Null)0.0 : (__Null)(double)result1;
                    quaternion.y = !float.TryParse(data[4][0], out result1) ? (__Null)0.0 : (__Null)(double)result1;
                    quaternion.z = !float.TryParse(data[5][0], out result1) ? (__Null)0.0 : (__Null)(double)result1;
                    quaternion.w = !float.TryParse(data[6][0], out result1) ? (__Null)0.0 : (__Null)(double)result1;
                    CinemachineVirtualCameraBase advNotStandCamera = player.CameraControl.ADVNotStandCamera;
                    ((Component)advNotStandCamera).get_transform().set_localPosition(vector3);
                    ((Component)advNotStandCamera).get_transform().set_localRotation(quaternion);
                    CinemachineVirtualCamera cinemachineVirtualCamera = advNotStandCamera as CinemachineVirtualCamera;
                    float result2;
                    if (Object.op_Inequality((Object)cinemachineVirtualCamera, (Object)null) && float.TryParse(data[7][0], out result2))
                    {
                        // ISSUE: cast to a reference type
                        // ISSUE: explicit reference operation
                        (^ (LensSettings&)ref cinemachineVirtualCamera.m_Lens).FieldOfView = (__Null)(double)result2;
                    }
                    player.CameraControl.Mode = CameraMode.ADVExceptStand;
                }
            }), (Action <Exception>)(ex => {}), (Action)(() => {}));
        }
Esempio n. 4
0
    public static void loadCamera(
        CinemachineVirtualCamera _ctrl,
        string _assetbundleFolder,
        string _strfile,
        bool _isDirect = false)
    {
        if (Object.op_Equality((Object)_ctrl, (Object)null))
        {
            return;
        }
        string text = string.Empty;

        if (!_isDirect)
        {
            text = GlobalMethod.LoadAllListText(_assetbundleFolder, _strfile, (List <string>)null);
        }
        else
        {
            TextAsset textAsset = CommonLib.LoadAsset <TextAsset>(_assetbundleFolder, _strfile, false, string.Empty);
            AssetBundleManager.UnloadAssetBundle(_assetbundleFolder, true, (string)null, false);
            if (Object.op_Implicit((Object)textAsset))
            {
                text = textAsset.get_text();
            }
        }
        if (text == string.Empty)
        {
            GlobalMethod.DebugLog("cameraファイル読み込めません", 1);
        }
        else
        {
            string[][] data;
            GlobalMethod.GetListString(text, out data);
            Vector3 vector3_1;
            vector3_1.x = (__Null)(double)float.Parse(data[0][0]);
            vector3_1.y = (__Null)(double)float.Parse(data[1][0]);
            vector3_1.z = (__Null)(double)float.Parse(data[2][0]);
            Vector3 vector3_2;
            vector3_2.x = (__Null)(double)float.Parse(data[3][0]);
            vector3_2.y = (__Null)(double)float.Parse(data[4][0]);
            vector3_2.z = (__Null)(double)float.Parse(data[5][0]);
            ((CinemachineVirtualCameraBase)_ctrl).get_LookAt().set_localPosition(vector3_1);
            ((Component)_ctrl).get_transform().set_localPosition(Vector3.op_Addition(vector3_2, vector3_1));
            float result = 0.0f;
            if (!float.TryParse(data[6][0], out result))
            {
                return;
            }
            // ISSUE: cast to a reference type
            // ISSUE: explicit reference operation
            (^ (LensSettings&)ref _ctrl.m_Lens).FieldOfView = (__Null)(double)result;
        }
    }
Esempio n. 5
0
 public static List <ExcelData.Param> LoadExcelDataAlFindlFile(
     string _strAssetPath,
     string _strFileName,
     int sCell,
     int sRow,
     int eCell,
     int eRow,
     List <string> _OmitFolderName = null,
     bool _isWarning = true)
 {
     GlobalMethod.lstABName.Clear();
     GlobalMethod.lstABName = GlobalMethod.GetAssetBundleNameListFromPath(_strAssetPath, false);
     GlobalMethod.lstABName.Sort();
     for (int index1 = 0; index1 < GlobalMethod.lstABName.Count; ++index1)
     {
         GlobalMethod.strNo.Clear();
         GlobalMethod.strNo.Append(Path.GetFileNameWithoutExtension(GlobalMethod.lstABName[index1]));
         GlobalMethod.strNo.Replace(GlobalMethod.strNo.ToString(), YS_Assist.GetStringRight(GlobalMethod.strNo.ToString(), 2));
         if (_OmitFolderName == null || !_OmitFolderName.Contains(GlobalMethod.strNo.ToString()))
         {
             string[] allAssetName = AssetBundleCheck.GetAllAssetName(GlobalMethod.lstABName[index1], false, (string)null, false);
             bool     flag         = false;
             for (int index2 = 0; index2 < allAssetName.Length; ++index2)
             {
                 if (allAssetName[index2].Compare(_strFileName, true))
                 {
                     flag = true;
                     break;
                 }
             }
             if (!flag)
             {
                 GlobalMethod.DebugLog("[" + GlobalMethod.lstABName[index1] + "][" + _strFileName + "]は見つかりません", 1);
             }
             else
             {
                 List <ExcelData.Param> objList = GlobalMethod.LoadExcelData(GlobalMethod.lstABName[index1], _strFileName, sCell, sRow, eCell, eRow, _isWarning);
                 if (objList != null)
                 {
                     return(objList);
                 }
             }
         }
     }
     return((List <ExcelData.Param>)null);
 }
Esempio n. 6
0
    public static List <T> LoadAllFolder <T>(
        string _findFolder,
        string _strLoadFile,
        List <string> _OmitFolderName = null)
        where T : Object
    {
        List <T> objList = new List <T>();

        GlobalMethod.lstABName.Clear();
        GlobalMethod.lstABName = GlobalMethod.GetAssetBundleNameListFromPath(_findFolder, false);
        GlobalMethod.lstABName.Sort();
        for (int index1 = 0; index1 < GlobalMethod.lstABName.Count; ++index1)
        {
            string stringRight = YS_Assist.GetStringRight(Path.GetFileNameWithoutExtension(GlobalMethod.lstABName[index1]), 2);
            if (_OmitFolderName == null || !_OmitFolderName.Contains(stringRight))
            {
                string[] allAssetName = AssetBundleCheck.GetAllAssetName(GlobalMethod.lstABName[index1], false, (string)null, false);
                bool     flag         = false;
                for (int index2 = 0; index2 < allAssetName.Length; ++index2)
                {
                    if (allAssetName[index2].Compare(_strLoadFile, true))
                    {
                        flag = true;
                        break;
                    }
                }
                if (!flag)
                {
                    GlobalMethod.DebugLog("[" + GlobalMethod.lstABName[index1] + "][" + _strLoadFile + "]は見つかりません", 1);
                }
                else
                {
                    T obj = CommonLib.LoadAsset <T>(GlobalMethod.lstABName[index1], _strLoadFile, false, string.Empty);
                    AssetBundleManager.UnloadAssetBundle(GlobalMethod.lstABName[index1], true, (string)null, false);
                    if (Object.op_Implicit((Object)(object)obj))
                    {
                        objList.Add(obj);
                    }
                }
            }
        }
        return(objList);
    }
Esempio n. 7
0
    public static string LoadAllListText(
        string _assetbundleFolder,
        string _strLoadFile,
        List <string> _OmitFolderName = null)
    {
        StringBuilder stringBuilder = new StringBuilder();

        GlobalMethod.lstABName.Clear();
        GlobalMethod.lstABName = GlobalMethod.GetAssetBundleNameListFromPath(_assetbundleFolder, false);
        GlobalMethod.lstABName.Sort();
        for (int index1 = 0; index1 < GlobalMethod.lstABName.Count; ++index1)
        {
            string stringRight = YS_Assist.GetStringRight(Path.GetFileNameWithoutExtension(GlobalMethod.lstABName[index1]), 2);
            if (_OmitFolderName == null || !_OmitFolderName.Contains(stringRight))
            {
                string[] allAssetName = AssetBundleCheck.GetAllAssetName(GlobalMethod.lstABName[index1], false, (string)null, false);
                bool     flag         = false;
                for (int index2 = 0; index2 < allAssetName.Length; ++index2)
                {
                    if (allAssetName[index2].Compare(_strLoadFile, true))
                    {
                        flag = true;
                        break;
                    }
                }
                if (!flag)
                {
                    GlobalMethod.DebugLog("[" + GlobalMethod.lstABName[index1] + "][" + _strLoadFile + "]は見つかりません", 1);
                }
                else
                {
                    TextAsset textAsset = CommonLib.LoadAsset <TextAsset>(GlobalMethod.lstABName[index1], _strLoadFile, false, string.Empty);
                    AssetBundleManager.UnloadAssetBundle(GlobalMethod.lstABName[index1], true, (string)null, false);
                    if (!Object.op_Equality((Object)textAsset, (Object)null))
                    {
                        stringBuilder.Append(textAsset.get_text());
                    }
                }
            }
        }
        return(stringBuilder.ToString());
    }
Esempio n. 8
0
    public bool Load(
        string _strAssetPath,
        string _nameFile,
        GameObject _objMale,
        GameObject _objMale1,
        GameObject _objFemale1    = null,
        ChaControl _customFemale1 = null)
    {
        this.aobjBody[0] = _objMale;
        this.aobjBody[2] = _objMale1;
        if (Object.op_Inequality((Object)_objFemale1, (Object)null))
        {
            this.aobjBody[3] = _objFemale1;
            if (this.ctrlMetaball[4] != null)
            {
                this.ctrlMetaball[4].chaCustom = _customFemale1;
            }
        }
        foreach (MetaballCtrl.ShootCtrl shootCtrl in this.actrlShoot)
        {
            shootCtrl.lstShoot.Clear();
        }
        string empty1       = string.Empty;
        string _strFileName = _nameFile.ContainsAny("f2", "f1") ? (_nameFile.Contains("ai3p") ? _nameFile.Remove(4, 3) : _nameFile.Remove(3, 3)) : _nameFile.Remove(3, 2);

        this.infolist = GlobalMethod.LoadExcelDataAlFindlFile(_strAssetPath, _strFileName, 1, 1, 3, 1, (List <string>)null, true);
        if (this.infolist == null)
        {
            GlobalMethod.DebugLog("excel : [" + _strFileName + "]は読み込めなかった 警告無しでここに来たら[" + _strAssetPath + "]自体がない", 1);
            return(false);
        }
        int count = this.infolist.Count;

        if (count < 3)
        {
            GlobalMethod.DebugLog("excel : [" + _strFileName + "]は必ず3行必要", 1);
            return(false);
        }
        StringBuilder stringBuilder1 = new StringBuilder();
        StringBuilder stringBuilder2 = new StringBuilder();
        StringBuilder stringBuilder3 = new StringBuilder();
        string        empty2         = string.Empty;

        for (int index1 = 0; index1 < count; ++index1)
        {
            int num1 = 0;
            if (this.ctrlMetaball[index1] != null)
            {
                MetaballShoot metaballShoot = this.ctrlMetaball[index1];
                List <string> list1         = this.infolist[index1].list;
                int           index2        = num1;
                int           num2          = index2 + 1;
                int           num3          = !(list1[index2] == "1") ? 0 : 1;
                metaballShoot.isEnable = num3 != 0;
                if (this.ctrlMetaball[index1].isEnable)
                {
                    List <string> list2        = this.infolist[index1].list;
                    int           index3       = num2;
                    int           num4         = index3 + 1;
                    int           intTryParse1 = GlobalMethod.GetIntTryParse(list2[index3], 0);
                    this.ctrlMetaball[index1].ShootAxis = !Object.op_Implicit((Object)this.aobjBody[intTryParse1]) ? (GameObject)null : this.aobjBody[intTryParse1].get_transform().FindLoop(this.infolist[index1].list[num4++]);
                    if (Object.op_Equality((Object)this.aobjBody[intTryParse1], (Object)null))
                    {
                        ++num4;
                    }
                    List <string> list3        = this.infolist[index1].list;
                    int           index4       = num4;
                    int           num5         = index4 + 1;
                    int           intTryParse2 = GlobalMethod.GetIntTryParse(list3[index4], 0);
                    GameObject    gameObject1  = !Object.op_Implicit((Object)this.aobjBody[intTryParse2]) ? (GameObject)null : this.aobjBody[intTryParse2].get_transform().FindLoop(this.infolist[index1].list[num5++]);
                    this.ctrlMetaball[index1].parentTransform = !Object.op_Implicit((Object)gameObject1) ? (Transform)null : gameObject1.get_transform();
                    this.aParam[index1].param[0].objParent    = gameObject1;
                    if (Object.op_Equality((Object)this.aobjBody[intTryParse2], (Object)null))
                    {
                        ++num5;
                    }
                    List <string> list4        = this.infolist[index1].list;
                    int           index5       = num5;
                    int           num6         = index5 + 1;
                    int           intTryParse3 = GlobalMethod.GetIntTryParse(list4[index5], 0);
                    GameObject    gameObject2  = !Object.op_Implicit((Object)this.aobjBody[intTryParse3]) ? (GameObject)null : this.aobjBody[intTryParse3].get_transform().FindLoop(this.infolist[index1].list[num6++]);
                    this.aParam[index1].param[1].objParent = gameObject2;
                    if (Object.op_Equality((Object)this.aobjBody[intTryParse3], (Object)null))
                    {
                        ++num6;
                    }
                    stringBuilder1.Clear();
                    StringBuilder stringBuilder4 = stringBuilder1;
                    List <string> list5          = this.infolist[index1].list;
                    int           index6         = num6;
                    int           num7           = index6 + 1;
                    string        str1           = list5[index6];
                    stringBuilder4.Append(str1);
                    stringBuilder2.Clear();
                    StringBuilder stringBuilder5 = stringBuilder2;
                    List <string> list6          = this.infolist[index1].list;
                    int           index7         = num7;
                    int           num8           = index7 + 1;
                    string        str2           = list6[index7];
                    stringBuilder5.Append(str2);
                    stringBuilder3.Clear();
                    StringBuilder stringBuilder6 = stringBuilder3;
                    List <string> list7          = this.infolist[index1].list;
                    int           index8         = num8;
                    int           num9           = index8 + 1;
                    string        str3           = list7[index8];
                    stringBuilder6.Append(str3);
                    this.aParam[index1].param[0].objShoot = this.LoadSiruObject(stringBuilder1.ToString(), stringBuilder2.ToString(), stringBuilder3.ToString());
                    this.ctrlMetaball[index1].ShootObj    = this.aParam[index1].param[0].objShoot;
                    AssetBundleManager.UnloadAssetBundle(stringBuilder1.ToString(), false, stringBuilder3.ToString(), false);
                    stringBuilder1.Clear();
                    StringBuilder stringBuilder7 = stringBuilder1;
                    List <string> list8          = this.infolist[index1].list;
                    int           index9         = num9;
                    int           num10          = index9 + 1;
                    string        str4           = list8[index9];
                    stringBuilder7.Append(str4);
                    stringBuilder2.Clear();
                    StringBuilder stringBuilder8 = stringBuilder2;
                    List <string> list9          = this.infolist[index1].list;
                    int           index10        = num10;
                    int           num11          = index10 + 1;
                    string        str5           = list9[index10];
                    stringBuilder8.Append(str5);
                    stringBuilder3.Clear();
                    StringBuilder stringBuilder9 = stringBuilder3;
                    List <string> list10         = this.infolist[index1].list;
                    int           index11        = num11;
                    int           num12          = index11 + 1;
                    string        str6           = list10[index11];
                    stringBuilder9.Append(str6);
                    this.aParam[index1].param[1].objShoot = this.LoadSiruObject(stringBuilder1.ToString(), stringBuilder2.ToString(), stringBuilder3.ToString());
                    AssetBundleManager.UnloadAssetBundle(stringBuilder1.ToString(), false, stringBuilder3.ToString(), false);
                    MetaballCtrl.MetaballParameterInfo metaballParameterInfo1 = this.aParam[index1].param[0];
                    List <string> list11    = this.infolist[index1].list;
                    int           index12   = num12;
                    int           num13     = index12 + 1;
                    double        num14     = (double)float.Parse(list11[index12]);
                    List <string> list12    = this.infolist[index1].list;
                    int           index13   = num13;
                    int           num15     = index13 + 1;
                    double        num16     = (double)float.Parse(list12[index13]);
                    Vector2       vector2_1 = new Vector2((float)num14, (float)num16);
                    metaballParameterInfo1.speedS = vector2_1;
                    MetaballCtrl.MetaballParameterInfo metaballParameterInfo2 = this.aParam[index1].param[0];
                    List <string> list13    = this.infolist[index1].list;
                    int           index14   = num15;
                    int           num17     = index14 + 1;
                    double        num18     = (double)float.Parse(list13[index14]);
                    List <string> list14    = this.infolist[index1].list;
                    int           index15   = num17;
                    int           num19     = index15 + 1;
                    double        num20     = (double)float.Parse(list14[index15]);
                    Vector2       vector2_2 = new Vector2((float)num18, (float)num20);
                    metaballParameterInfo2.rotationS = vector2_2;
                    MetaballCtrl.MetaballParameterInfo metaballParameterInfo3 = this.aParam[index1].param[0];
                    List <string> list15    = this.infolist[index1].list;
                    int           index16   = num19;
                    int           num21     = index16 + 1;
                    double        num22     = (double)float.Parse(list15[index16]);
                    List <string> list16    = this.infolist[index1].list;
                    int           index17   = num21;
                    int           num23     = index17 + 1;
                    double        num24     = (double)float.Parse(list16[index17]);
                    Vector2       vector2_3 = new Vector2((float)num22, (float)num24);
                    metaballParameterInfo3.speedM = vector2_3;
                    MetaballCtrl.MetaballParameterInfo metaballParameterInfo4 = this.aParam[index1].param[0];
                    List <string> list17    = this.infolist[index1].list;
                    int           index18   = num23;
                    int           num25     = index18 + 1;
                    double        num26     = (double)float.Parse(list17[index18]);
                    List <string> list18    = this.infolist[index1].list;
                    int           index19   = num25;
                    int           num27     = index19 + 1;
                    double        num28     = (double)float.Parse(list18[index19]);
                    Vector2       vector2_4 = new Vector2((float)num26, (float)num28);
                    metaballParameterInfo4.rotationM = vector2_4;
                    MetaballCtrl.MetaballParameterInfo metaballParameterInfo5 = this.aParam[index1].param[0];
                    List <string> list19    = this.infolist[index1].list;
                    int           index20   = num27;
                    int           num29     = index20 + 1;
                    double        num30     = (double)float.Parse(list19[index20]);
                    List <string> list20    = this.infolist[index1].list;
                    int           index21   = num29;
                    int           num31     = index21 + 1;
                    double        num32     = (double)float.Parse(list20[index21]);
                    Vector2       vector2_5 = new Vector2((float)num30, (float)num32);
                    metaballParameterInfo5.speedL = vector2_5;
                    MetaballCtrl.MetaballParameterInfo metaballParameterInfo6 = this.aParam[index1].param[0];
                    List <string> list21    = this.infolist[index1].list;
                    int           index22   = num31;
                    int           num33     = index22 + 1;
                    double        num34     = (double)float.Parse(list21[index22]);
                    List <string> list22    = this.infolist[index1].list;
                    int           index23   = num33;
                    int           num35     = index23 + 1;
                    double        num36     = (double)float.Parse(list22[index23]);
                    Vector2       vector2_6 = new Vector2((float)num34, (float)num36);
                    metaballParameterInfo6.rotationL          = vector2_6;
                    this.ctrlMetaball[index1].speedSMin       = (float)this.aParam[index1].param[0].speedS.x;
                    this.ctrlMetaball[index1].speedSMax       = (float)this.aParam[index1].param[0].speedS.y;
                    this.ctrlMetaball[index1].randomRotationS = this.aParam[index1].param[0].rotationS;
                    this.ctrlMetaball[index1].speedMMin       = (float)this.aParam[index1].param[0].speedM.x;
                    this.ctrlMetaball[index1].speedMMax       = (float)this.aParam[index1].param[0].speedM.y;
                    this.ctrlMetaball[index1].randomRotationM = this.aParam[index1].param[0].rotationM;
                    this.ctrlMetaball[index1].speedLMin       = (float)this.aParam[index1].param[0].speedL.x;
                    this.ctrlMetaball[index1].speedLMax       = (float)this.aParam[index1].param[0].speedL.y;
                    this.ctrlMetaball[index1].randomRotationL = this.aParam[index1].param[0].rotationL;
                    MetaballCtrl.MetaballParameterInfo metaballParameterInfo7 = this.aParam[index1].param[1];
                    List <string> list23    = this.infolist[index1].list;
                    int           index24   = num35;
                    int           num37     = index24 + 1;
                    double        num38     = (double)float.Parse(list23[index24]);
                    List <string> list24    = this.infolist[index1].list;
                    int           index25   = num37;
                    int           num39     = index25 + 1;
                    double        num40     = (double)float.Parse(list24[index25]);
                    Vector2       vector2_7 = new Vector2((float)num38, (float)num40);
                    metaballParameterInfo7.speedS = vector2_7;
                    MetaballCtrl.MetaballParameterInfo metaballParameterInfo8 = this.aParam[index1].param[1];
                    List <string> list25    = this.infolist[index1].list;
                    int           index26   = num39;
                    int           num41     = index26 + 1;
                    double        num42     = (double)float.Parse(list25[index26]);
                    List <string> list26    = this.infolist[index1].list;
                    int           index27   = num41;
                    int           num43     = index27 + 1;
                    double        num44     = (double)float.Parse(list26[index27]);
                    Vector2       vector2_8 = new Vector2((float)num42, (float)num44);
                    metaballParameterInfo8.rotationS = vector2_8;
                    MetaballCtrl.MetaballParameterInfo metaballParameterInfo9 = this.aParam[index1].param[1];
                    List <string> list27    = this.infolist[index1].list;
                    int           index28   = num43;
                    int           num45     = index28 + 1;
                    double        num46     = (double)float.Parse(list27[index28]);
                    List <string> list28    = this.infolist[index1].list;
                    int           index29   = num45;
                    int           num47     = index29 + 1;
                    double        num48     = (double)float.Parse(list28[index29]);
                    Vector2       vector2_9 = new Vector2((float)num46, (float)num48);
                    metaballParameterInfo9.speedM = vector2_9;
                    MetaballCtrl.MetaballParameterInfo metaballParameterInfo10 = this.aParam[index1].param[1];
                    List <string> list29     = this.infolist[index1].list;
                    int           index30    = num47;
                    int           num49      = index30 + 1;
                    double        num50      = (double)float.Parse(list29[index30]);
                    List <string> list30     = this.infolist[index1].list;
                    int           index31    = num49;
                    int           num51      = index31 + 1;
                    double        num52      = (double)float.Parse(list30[index31]);
                    Vector2       vector2_10 = new Vector2((float)num50, (float)num52);
                    metaballParameterInfo10.rotationM = vector2_10;
                    MetaballCtrl.MetaballParameterInfo metaballParameterInfo11 = this.aParam[index1].param[1];
                    List <string> list31     = this.infolist[index1].list;
                    int           index32    = num51;
                    int           num53      = index32 + 1;
                    double        num54      = (double)float.Parse(list31[index32]);
                    List <string> list32     = this.infolist[index1].list;
                    int           index33    = num53;
                    int           num55      = index33 + 1;
                    double        num56      = (double)float.Parse(list32[index33]);
                    Vector2       vector2_11 = new Vector2((float)num54, (float)num56);
                    metaballParameterInfo11.speedL = vector2_11;
                    MetaballCtrl.MetaballParameterInfo metaballParameterInfo12 = this.aParam[index1].param[1];
                    List <string> list33     = this.infolist[index1].list;
                    int           index34    = num55;
                    int           num57      = index34 + 1;
                    double        num58      = (double)float.Parse(list33[index34]);
                    List <string> list34     = this.infolist[index1].list;
                    int           index35    = num57;
                    int           num59      = index35 + 1;
                    double        num60      = (double)float.Parse(list34[index35]);
                    Vector2       vector2_12 = new Vector2((float)num58, (float)num60);
                    metaballParameterInfo12.rotationL = vector2_12;
                    while (this.infolist[index1].list.Count > num59)
                    {
                        List <string> list35  = this.infolist[index1].list;
                        int           index36 = num59;
                        int           num61   = index36 + 1;
                        string        str7    = list35[index36];
                        if (!(str7 == string.Empty))
                        {
                            this.info          = new MetaballCtrl.ShootInfo();
                            this.info.isInside = str7 == "1";
                            ref MetaballCtrl.ShootInfo local = ref this.info;
                            List <string> list36             = this.infolist[index1].list;
                            int           index37            = num61;
                            int           num62 = index37 + 1;
                            string        str8  = list36[index37];
                            local.nameAnimation = str8;
                            List <string> list37  = this.infolist[index1].list;
                            int           index38 = num62;
                            num59 = index38 + 1;
                            float result;
                            if (!float.TryParse(list37[index38], out result))
                            {
                                result = 0.0f;
                            }
                            this.info.timeShoot = result;
                            this.info.timeOld   = 0.0f;
                            this.actrlShoot[index1].lstShoot.Add(this.info);
                        }
                        else
                        {
                            break;
                        }
                    }
                }
            }
Esempio n. 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);
    }