Beispiel #1
0
        static IEnumerator makeData()
        {
            #region ゲーム
            MasterDungeon masterDungeon = new MasterDungeon();
            yield return(EveryStudioLibrary.Editor.EditorCoroutine.start(masterDungeon.SpreadSheet(DataManager.SS_MASTER, "dungeon", () => {
                masterDungeon.SaveEditor("07data/master", "master_dungeon");
            })));

            MasterEnemy masterEnemy = new MasterEnemy();
            yield return(EveryStudioLibrary.Editor.EditorCoroutine.start(masterEnemy.SpreadSheet(DataManager.SS_MASTER, "enemy", () => {
                masterEnemy.SaveEditor("07data/master", "master_enemy");
            })));

            MasterFloor masterFloor = new MasterFloor();
            yield return(EveryStudioLibrary.Editor.EditorCoroutine.start(masterFloor.SpreadSheet(DataManager.SS_MASTER, "floor", () => {
                masterFloor.SaveEditor("07data/master", "master_floor");
            })));

            MasterItem masterItem = new MasterItem();
            yield return(EveryStudioLibrary.Editor.EditorCoroutine.start(masterItem.SpreadSheet(DataManager.SS_MASTER, "item", () => {
                masterItem.SaveEditor("07data/master", "master_item");
            })));

            MasterMedalPrize masterMedalPrize = new MasterMedalPrize();
            yield return(EveryStudioLibrary.Editor.EditorCoroutine.start(masterMedalPrize.SpreadSheet(DataManager.SS_MASTER, "medal_prize", () => {
                masterMedalPrize.SaveEditor("07data/master", "master_medal_prize");
            })));

            MasterSkin masterSkin = new MasterSkin();
            yield return(EveryStudioLibrary.Editor.EditorCoroutine.start(masterSkin.SpreadSheet(DataManager.SS_MASTER, "skin", () => {
                masterSkin.SaveEditor("07data/master", "master_skin");
            })));

            #endregion

            #region キャンプ


            #endregion
            #region チュートリアル用
            #endregion
        }
Beispiel #2
0
    private IEnumerator initialize()
    {
        base.Initialize();

        masterGameRule.Load(textMasterGameRule);

        if (masterGameRule.Read("charamode") == "multi")
        {
            chara_control.m_multiSprite.enabled  = true;
            chara_control.m_singleSprite.enabled = false;
        }
        else
        {
            chara_control.m_multiSprite.enabled  = false;
            chara_control.m_singleSprite.enabled = true;
        }

        adsbanner_top.Show(masterGameRule.Read("adbanner_top"));
        adsbanner_bottom.Show(masterGameRule.Read("adbanner_bottom"));



        masterItem.Load(textMasterItem);
        masterEnemy.Load(textMasterEnemy);
        masterFloor.Load(textMasterFloor);
        masterDungeon.Load(textMasterDungeon);
        masterMedalPrize.Load(textMasterMedalPrize);
        masterSkin.Load(textMasterSkin);
        masterAccessary.Load(textMasterAccessary);

#if UNITY_EDITOR
        if (bUseSSData)
        {
            yield return(StartCoroutine(masterItem.SpreadSheet(SS_MASTER, "item", () => { })));

            yield return(StartCoroutine(masterSkin.SpreadSheet(SS_MASTER, "skin", () => { })));

            yield return(StartCoroutine(masterEnemy.SpreadSheet(SS_MASTER, "enemy", () => { })));

            yield return(StartCoroutine(masterDungeon.SpreadSheet(SS_MASTER, "dungeon", () => { })));

            yield return(StartCoroutine(masterFloor.SpreadSheet(SS_MASTER, "floor", () => { })));

            yield return(StartCoroutine(masterMedalPrize.SpreadSheet(SS_MASTER, "medal_prize", () => { })));
        }
#else
        bUseSSData = false;
#endif


        string data_item = string.Format("{0}/{1}", floder_name, "data_item");
        dataItem = new DataItem();
        dataItem.SetSaveFilename(data_item);
        if (false == dataItem.LoadMulti(data_item))
        {
            List <MasterItemParam> initiali_data_list = masterItem.list.FindAll(p => p.item_id / MasterItem.LargeCategory <= MasterItem.CategoryMagic);
            foreach (MasterItemParam param in initiali_data_list)
            {
                if (0 < param.item_id / 10)
                {
                    dataItem.AddItem(param.item_id, 0);
                }
            }
            dataItem.Save();
        }
        dataItem.list.Sort((a, b) => a.item_id - b.item_id);

        string strUserData = string.Format("{0}/{1}", floder_name, "user_data");
        user_data.SetSaveFilename(strUserData);
        if (false == user_data.LoadMulti(strUserData))
        {
            // ユーザーデータの初期化処理
            floor_current = 1;
            floor_best    = 1;
            floor_restart = 1;

            user_data.WriteInt(Defines.KeyCoin, 0);
            user_data.WriteInt(Defines.KeyGem, 0);


            user_data.Write(Defines.KEY_SOUND_BGM, 1.0f.ToString());
            user_data.Write(Defines.KEY_SOUND_SE, 1.0f.ToString());

            user_data.WriteInt(Defines.KEY_GAMESPEEDMETER, 1);

            user_data.Save();
        }
        if (user_data.HasKey(Defines.KEY_SOUND_BGM) == false)
        {
            user_data.Write(Defines.KEY_SOUND_BGM, 1.0f.ToString());
        }
        if (user_data.HasKey(Defines.KEY_SOUND_SE) == false)
        {
            user_data.Write(Defines.KEY_SOUND_SE, 1.0f.ToString());
        }

        if (user_data.HasKey(Defines.KEY_CHARA_LEVEL))
        {
            Debug.Log("chara_restore");
            dataChara.Restore(user_data.ReadInt(Defines.KEY_CHARA_LEVEL));
        }
        else
        {
            // リスタートフロアをセットする
            //user_data.WriteInt(Defines.KEY_CHARA_FLOOR_CURRENT, Instance.floor_restart);
            Instance.floor_current = Instance.floor_restart;
            dataChara.Build(1);

            user_data.Save();
        }


        SetSpeedMeter(user_data.ReadInt(Defines.KEY_GAMESPEEDMETER));

        if (user_data.HasKey(Defines.KEY_GAMESPEED_LEVEL))
        {
            int game_speed_level = user_data.ReadInt(Defines.KEY_GAMESPEED_LEVEL);
            //Debug.Log(game_speed_level);
            gameSpeedControl.SetSpeedLevel(game_speed_level);
        }

        //Debug.Log(user_data.list.Count);
        foreach (CsvKvsParam p in user_data.list)
        {
            //Debug.Log(p.key);
        }
        Debug.Log("datamanager.initialized");

        Initialized = true;

        yield return(null);
    }