Esempio n. 1
0
    public IEnumerator OverrideMasterData()
    {
        yield return(StartCoroutine(masterChara.SpreadSheet(SS_ID, "chara", () => { })));

        yield return(StartCoroutine(masterCharaCard.SpreadSheet(SS_ID, "chara_card", () => { })));

        yield return(StartCoroutine(masterStage.SpreadSheet(SS_ID, "stage", () => { })));

        yield return(StartCoroutine(masterCard.SpreadSheet(SS_ID, "card", () => { })));

        yield return(StartCoroutine(masterCardSymbol.SpreadSheet(SS_ID, "card_symbol", () => { })));

        yield return(StartCoroutine(masterItem.SpreadSheet(SS_ID, "item", () => { })));

        yield return(StartCoroutine(masterStageItem.SpreadSheet(SS_ID, "stage_item", () => { })));

        yield return(StartCoroutine(masterStageCard.SpreadSheet(SS_ID, "stage_card", () => { })));

        yield return(StartCoroutine(masterSkill.SpreadSheet(SS_ID, "skill", () => { })));

        yield return(StartCoroutine(masterCampItem.SpreadSheet(SS_ID, "campitem", () => { })));

        yield return(StartCoroutine(masterCampShop.SpreadSheet(SS_ID, "campshop", () => { })));

        yield return(StartCoroutine(masterLevelup.SpreadSheet(SS_ID, "levelup", () => { })));

        yield return(StartCoroutine(masterHelp.SpreadSheet(SS_ID, "help", () => { })));
    }
Esempio n. 2
0
    public IEnumerator OverrideMasterData()
    {
        yield return(StartCoroutine(masterStage.SpreadSheet(SS_ID, "stage", () => { })));

        yield return(StartCoroutine(masterCorridor.SpreadSheet(SS_ID, "corridor", () => { })));

        yield return(StartCoroutine(masterCorridorEvent.SpreadSheet(SS_ID, "corridor_event", () => { })));

        yield return(StartCoroutine(masterCard.SpreadSheet(SS_ID, "card", () => { })));

        yield return(StartCoroutine(masterCardSymbol.SpreadSheet(SS_ID, "card_symbol", () => { })));

        yield return(StartCoroutine(masterChara.SpreadSheet(SS_ID, "chara", () => { })));

        yield return(StartCoroutine(masterCharaCard.SpreadSheet(SS_ID, "chara_card", () => { })));

        yield return(StartCoroutine(masterItem.SpreadSheet(SS_ID, "item", () => { })));

        yield return(StartCoroutine(masterStageWave.SpreadSheet(SS_ID, "stage_wave", () => { })));

        yield return(StartCoroutine(masterStageEvent.SpreadSheet(SS_ID, "stage_event", () => { })));

        yield return(StartCoroutine(masterStageItem.SpreadSheet(SS_ID, "stage_item", () => { })));

        yield return(StartCoroutine(masterStageCard.SpreadSheet(SS_ID, "stage_card", () => { })));

        yield return(StartCoroutine(masterStageMission.SpreadSheet(SS_ID, "stage_mission", () => { })));

        yield return(StartCoroutine(masterStageEnemy.SpreadSheet(SS_ID, "stage_enemy", () => { })));

        yield return(StartCoroutine(masterStageBattleBonus.SpreadSheet(SS_ID, "stage_bb", () => { })));

        yield return(StartCoroutine(masterStageShopItem.SpreadSheet(SS_ID, "stage_shopitem", () => { })));

        yield return(StartCoroutine(masterSkill.SpreadSheet(SS_ID, "skill", () => { })));

        yield return(StartCoroutine(masterSkillEffect.SpreadSheet(SS_ID, "skill_effect", () => { })));

        yield return(StartCoroutine(masterBattleBonus.SpreadSheet(SS_ID, "bb", () => { })));

        yield return(StartCoroutine(masterMission.SpreadSheet(SS_ID, "mission", () => { })));

        yield return(StartCoroutine(masterMissionDetail.SpreadSheet(SS_ID, "mission_detail", () => { })));
    }
Esempio n. 3
0
        static IEnumerator makeData()
        {
            #region ゲーム
            MasterStage masterStage = new MasterStage();
            yield return(EveryStudioLibrary.Editor.EditorCoroutine.start(masterStage.SpreadSheet(DataManagerGame.SS_ID, "stage", () => {
                masterStage.SaveEditor("07data/master", "master_stage");
            })));

            MasterCorridor masterCorridor = new MasterCorridor();
            yield return(EveryStudioLibrary.Editor.EditorCoroutine.start(masterCorridor.SpreadSheet(DataManagerGame.SS_ID, "corridor", () => {
                masterCorridor.SaveEditor("07data/master", "master_corridor");
            })));

            MasterCorridorEvent masterCorridorEvent = new MasterCorridorEvent();
            yield return(EveryStudioLibrary.Editor.EditorCoroutine.start(masterCorridorEvent.SpreadSheet(DataManagerGame.SS_ID, "corridor_event", () => {
                masterCorridorEvent.SaveEditor("07data/master", "master_corridor_event");
            })));

            MasterCard masterCard = new MasterCard();
            yield return(EveryStudioLibrary.Editor.EditorCoroutine.start(masterCard.SpreadSheet(DataManagerGame.SS_ID, "card", () => {
                masterCard.SaveEditor("07data/master", "master_card");
            })));

            MasterCardSymbol masterCardSymbol = new MasterCardSymbol();

            MasterChara     masterChara     = new MasterChara();
            MasterCharaCard masterCharaCard = new MasterCharaCard();

            MasterItem             masterItem             = new MasterItem();
            MasterStageWave        masterStageWave        = new MasterStageWave();
            MasterStageEvent       masterStageEvent       = new MasterStageEvent();
            MasterStageItem        masterStageItem        = new MasterStageItem();
            MasterStageCard        masterStageCard        = new MasterStageCard();
            MasterStageMission     masterStageMission     = new MasterStageMission();
            MasterStageEnemy       masterStageEnemy       = new MasterStageEnemy();
            MasterStageBattleBonus masterStageBattleBonus = new MasterStageBattleBonus();
            MasterStageShopItem    masterStageShopItem    = new MasterStageShopItem();

            MasterSkill       masterSkill       = new MasterSkill();
            MasterSkillEffect masterSkillEffect = new MasterSkillEffect();

            MasterBattleBonus masterBattleBonus = new MasterBattleBonus();

            MasterMission       masterMission       = new MasterMission();
            MasterMissionDetail masterMissionDetail = new MasterMissionDetail();


            yield return(EveryStudioLibrary.Editor.EditorCoroutine.start(masterCardSymbol.SpreadSheet(DataManagerGame.SS_ID, "card_symbol", () => {
                masterCardSymbol.SaveEditor("07data/master", "master_card_symbol");
            })));

            yield return(EveryStudioLibrary.Editor.EditorCoroutine.start(masterChara.SpreadSheet(DataManagerGame.SS_ID, "chara", () => {
                masterChara.SaveEditor("07data/master", "master_chara");
            })));

            yield return(EveryStudioLibrary.Editor.EditorCoroutine.start(masterCharaCard.SpreadSheet(DataManagerGame.SS_ID, "chara_card", () => {
                masterCharaCard.SaveEditor("07data/master", "master_chara_card");
            })));

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

            yield return(EveryStudioLibrary.Editor.EditorCoroutine.start(masterStageWave.SpreadSheet(DataManagerGame.SS_ID, "stage_wave", () => {
                masterStageWave.SaveEditor("07data/master", "master_stage_wave");
            })));

            yield return(EveryStudioLibrary.Editor.EditorCoroutine.start(masterStageEvent.SpreadSheet(DataManagerGame.SS_ID, "stage_event", () => {
                masterStageEvent.SaveEditor("07data/master", "master_stage_event");
            })));

            yield return(EveryStudioLibrary.Editor.EditorCoroutine.start(masterStageItem.SpreadSheet(DataManagerGame.SS_ID, "stage_item", () => {
                masterStageItem.SaveEditor("07data/master", "master_stage_item");
            })));

            yield return(EveryStudioLibrary.Editor.EditorCoroutine.start(masterStageCard.SpreadSheet(DataManagerGame.SS_ID, "stage_card", () => {
                masterStageCard.SaveEditor("07data/master", "master_stage_card");
            })));

            yield return(EveryStudioLibrary.Editor.EditorCoroutine.start(masterStageMission.SpreadSheet(DataManagerGame.SS_ID, "stage_mission", () => {
                masterStageMission.SaveEditor("07data/master", "master_stage_mission");
            })));

            yield return(EveryStudioLibrary.Editor.EditorCoroutine.start(masterStageEnemy.SpreadSheet(DataManagerGame.SS_ID, "stage_enemy", () => {
                masterStageEnemy.SaveEditor("07data/master", "master_stage_enemy");
            })));

            yield return(EveryStudioLibrary.Editor.EditorCoroutine.start(masterStageBattleBonus.SpreadSheet(DataManagerGame.SS_ID, "stage_bb", () => {
                masterStageBattleBonus.SaveEditor("07data/master", "master_stage_bb");
            })));

            yield return(EveryStudioLibrary.Editor.EditorCoroutine.start(masterStageShopItem.SpreadSheet(DataManagerGame.SS_ID, "stage_shopitem", () => {
                masterStageShopItem.SaveEditor("07data/master", "master_stage_shopitem");
            })));

            yield return(EveryStudioLibrary.Editor.EditorCoroutine.start(masterSkill.SpreadSheet(DataManagerGame.SS_ID, "skill", () => {
                masterSkill.SaveEditor("07data/master", "master_skill");
            })));

            yield return(EveryStudioLibrary.Editor.EditorCoroutine.start(masterSkillEffect.SpreadSheet(DataManagerGame.SS_ID, "skill_effect", () => {
                masterSkillEffect.SaveEditor("07data/master", "master_skill_effect");
            })));

            yield return(EveryStudioLibrary.Editor.EditorCoroutine.start(masterBattleBonus.SpreadSheet(DataManagerGame.SS_ID, "bb", () => {
                masterBattleBonus.SaveEditor("07data/master", "master_bb");
            })));

            yield return(EveryStudioLibrary.Editor.EditorCoroutine.start(masterMission.SpreadSheet(DataManagerGame.SS_ID, "mission", () => {
                masterMission.SaveEditor("07data/master", "master_mission");
            })));

            yield return(EveryStudioLibrary.Editor.EditorCoroutine.start(masterMissionDetail.SpreadSheet(DataManagerGame.SS_ID, "mission_detail", () => {
                masterMissionDetail.SaveEditor("07data/master", "master_mission_detail");
                foreach (MasterMissionDetailParam p in masterMissionDetail.list)
                {
                    //Debug.Log(p.message);
                }
            })));

            yield return(EveryStudioLibrary.Editor.EditorCoroutine.start(masterMission.SpreadSheet(DataManagerGame.SS_ID, "mission", () => {
                masterMission.SaveEditor("07data/master", "master_mission");
            })));


            #endregion

            #region キャンプ
            MasterCampItem masterCampItem = new MasterCampItem();
            MasterCampShop masterCampShop = new MasterCampShop();
            MasterLevelup  masterLevelup  = new MasterLevelup();
            MasterHelp     masterHelp     = new MasterHelp();

            yield return(EveryStudioLibrary.Editor.EditorCoroutine.start(masterCampItem.SpreadSheet(DMCamp.SS_ID, "campitem", () => {
                masterCampItem.SaveEditor("07data/master", "master_campitem");
            })));

            yield return(EveryStudioLibrary.Editor.EditorCoroutine.start(masterCampShop.SpreadSheet(DMCamp.SS_ID, "campshop", () => {
                masterCampShop.SaveEditor("07data/master", "master_campshop");
            })));

            yield return(EveryStudioLibrary.Editor.EditorCoroutine.start(masterLevelup.SpreadSheet(DMCamp.SS_ID, "levelup", () => {
                masterLevelup.SaveEditor("07data/master", "master_levelup");
            })));

            yield return(EveryStudioLibrary.Editor.EditorCoroutine.start(masterHelp.SpreadSheet(DMCamp.SS_ID, "help", () => {
                masterHelp.SaveEditor("07data/master", "master_help");
            })));



            #endregion
            #region チュートリアル用
            DataCard tutorialCard = new DataCard();
            yield return(EveryStudioLibrary.Editor.EditorCoroutine.start(tutorialCard.SpreadSheet(DMCamp.SS_ID, "tutorial_card", () => {
                tutorialCard.SaveEditor("07data/master", "data_tutorial_card");
            })));

            #endregion
        }
Esempio n. 4
0
    IEnumerator init_network()
    {
        Debug.Log("init_network start");
        yield return(StartCoroutine(config.SpreadSheet(Defines.SS_MASTER, "config", () => { })));

        masterChara.SetSaveFilename(Defines.FILENAME_MASTERCHARA);

        masterChara.Load(m_textAssetHolder.Get("master_chara"));
        masterWeapon.Load(m_textAssetHolder.Get("master_weapon"));
        masterArmor.Load(m_textAssetHolder.Get("master_armor"));
        masterSkill.Load(m_textAssetHolder.Get("master_skill"));
        masterPotion.Load(m_textAssetHolder.Get("master_potion"));
        masterTreasure.Load(m_textAssetHolder.Get("master_treasure"));
        masterEnemy.Load(m_textAssetHolder.Get("master_enemy"));
        masterItem.Load(m_textAssetHolder.Get("master_item"));
        masterStage.Load(m_textAssetHolder.Get("master_stage"));
        masterFloor.Load(m_textAssetHolder.Get("master_floor"));
        masterHelp.Load(m_textAssetHolder.Get("master_help"));

#if UNITY_EDITOR
        if (m_bLoadNetworkData)
        {
            #region 通信初期化
            yield return(StartCoroutine(masterChara.SpreadSheet(Defines.SS_MASTER, "chara", () => { })));

            yield return(StartCoroutine(masterWeapon.SpreadSheet(Defines.SS_MASTER, "weapon", () => { })));

            yield return(StartCoroutine(masterArmor.SpreadSheet(Defines.SS_MASTER, "armor", () => { })));

            yield return(StartCoroutine(masterSkill.SpreadSheet(Defines.SS_MASTER, "skill", () => { })));

            yield return(StartCoroutine(masterPotion.SpreadSheet(Defines.SS_MASTER, "potion", () => { })));

            yield return(StartCoroutine(masterTreasure.SpreadSheet(Defines.SS_MASTER, "treasure", () =>
            {
                /*
                 * foreach( MasterTreasureParam master in masterTreasure.list)
                 * {
                 *      Debug.Log(string.Format("id:{0} name:{1} sprite:{2}", master.treasure_id , master.name , master.sprite_name));
                 * }
                 */
            })));

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

            yield return(StartCoroutine(masterItem.SpreadSheet(Defines.SS_MASTER, "item", () => { })));

            yield return(StartCoroutine(masterStage.SpreadSheet(Defines.SS_MASTER, "stage", () => { })));

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

            yield return(StartCoroutine(masterHelp.SpreadSheet(Defines.SS_MASTER, "help", () => { })));

            #endregion
        }
#endif
        // 未初期化扱い
        if (!user_data.HasKey(Defines.KEY_AUTOPOTION_RATE))
        {
            user_data.WriteInt(Defines.KEY_USE_AUTOMOVE, 1);
            user_data.WriteInt(Defines.KEY_USE_AUTOPOTION, 1);

            user_data.WriteFloat(Defines.KEY_AUTOPOTION_RATE, Defines.DEFAULT_AUTOPOTION_RATE);
            user_data.WriteFloat(Defines.KEY_SOUNDVOLUME_BGM, Defines.SOUND_VOLME_DEFAULT);
            user_data.WriteFloat(Defines.KEY_SOUNDVOLUME_SE, Defines.SOUND_VOLME_DEFAULT);
        }


        game_data.SetSaveFilename(Defines.FILENAME_GAMEDATA);
        if (game_data.LoadMulti() == false)
        {
            // なんかする
            // なにもしなくてok
        }
        dataChara.SetSaveFilename(Defines.FILENAME_DATACHARA);
        if (dataChara.LoadMulti() == false)
        {
            // 初期データ的ななにか保存はしない
            DataCharaParam slime = new DataCharaParam();
            slime.chara_id = 1;
            slime.status   = DataChara.STATUS.USING.ToString();
            dataChara.list.Add(slime);
        }
        dataWeapon.SetSaveFilename(Defines.FILENAME_DATAWEAPON);
        if (dataWeapon.LoadMulti() == false)
        {
            DataWeaponParam add_weapon = new DataWeaponParam();
            add_weapon.weapon_id = 1;
            add_weapon.level     = 1;
            add_weapon.equip     = 1;           // 武器はtfで良いのでは?
            dataWeapon.Add(add_weapon);
        }
        dataWeaponAlbum.SetSaveFilename(Defines.FILENAME_DATAWEAPONALBUM);
        if (dataWeaponAlbum.LoadMulti() == false)
        {
            dataWeaponAlbum.AddAlbum(1);
        }


        dataArmor.SetSaveFilename(Defines.FILENAME_DATAARMOR);
        if (dataArmor.LoadMulti() == false)
        {
            for (int i = 0; i < MasterArmor.ArmorPositionArr.Length; i++)
            {
                DataArmorParam add = new DataArmorParam();
                add.position = MasterArmor.ArmorPositionArr[i];
                add.level    = 1;
                MasterArmorParam mas = masterArmor.list.Find(p => p.position == add.position && p.level == add.level);
                add.armor_id = mas.armor_id;
                dataArmor.list.Add(add);
            }
        }
        dataSkill.SetSaveFilename(Defines.FILENAME_DATASKILL);
        if (dataSkill.LoadMulti() == false)
        {
            dataSkill.list.Add(new DataSkillParam(1, 1));
        }
        dataPotion.SetSaveFilename(Defines.FILENAME_DATAPOTION);
        if (dataPotion.LoadMulti() == false)
        {
            DataPotionParam add = new DataPotionParam();
            add.potion_id = 1;
            add.num       = 9;
            add.is_use    = true;
            dataPotion.list.Add(add);
        }

        dataTreasure.SetSaveFilename(Defines.FILENAME_DATATREASURE);
        if (dataTreasure.LoadMulti() == false)
        {
            /*
             * int add_serial = dataTreasure.Add(1001);
             * DataTreasureParam add_treasure = dataTreasure.list.Find(p => p.serial == add_serial);
             * add_treasure.equip = 1;
             */
        }
        dataTreasureAlbum.SetSaveFilename(Defines.FILENAME_DATATREASUREALBUM);
        if (dataTreasureAlbum.LoadMulti() == false)
        {
            /*
             * dataTreasureAlbum.Add(1002);
             * dataTreasureAlbum.Add(1003);
             * dataTreasureAlbum.Add(1006);
             * dataTreasureAlbum.Add(1010);
             * dataTreasureAlbum.Add(1026);
             */
        }

        /*
         * dataScroll.SetSaveFilename(Defines.FILENAME_DATASCROLL);
         * if( dataScroll.LoadMulti()== false)
         * {
         *      dataScroll.list.Add(new DataScrollParam(1, 120));
         *      dataScroll.list.Add(new DataScrollParam(2, 120));
         *      dataScroll.list.Add(new DataScrollParam(3, 120));
         *      dataScroll.list.Add(new DataScrollParam(4, 120));
         *      dataScroll.list.Add(new DataScrollParam(5, 120));
         * }
         */
        dataUnit.SetSaveFilename(Defines.FILENAME_DATAUNIT);
        if (dataUnit.LoadMulti() == false)
        {
        }
        dataItem.SetSaveFilename(Defines.FILENAME_DATAITEM);
        if (dataItem.LoadMulti() == false)
        {
            for (int i = 0; i < 5; i++)
            {
                dataItem.Add(Defines.ITEM_ID_SCROLL_BLUE + i, 0);
            }
        }
        dataGetItem.SetSaveFilename(Defines.FILENAME_DATAITEM_GET);
        if (dataGetItem.LoadMulti() == false)
        {
        }
        dataStage.SetSaveFilename(Defines.FILENAME_DATASTAGE);
        if (dataStage.LoadMulti() == false)
        {
            DataStageParam data = new DataStageParam();
            data.stage_id = 1;
            data.status   = 1;
            dataStage.list.Add(data);
        }
        dataFloor.SetSaveFilename(Defines.FILENAME_DATAFLOOR);
        if (dataFloor.LoadMulti() == false)
        {
            DataFloorParam data = new DataFloorParam();
            data.floor_id = 1;
            data.status   = 1;
            dataFloor.list.Add(data);
        }


        if (m_txtKey != null)
        {
            user_data.AddListenerInt(Defines.KeyKey, (iValue) =>
            {
                m_txtKey.text = iValue.ToString();
            });
            user_data.AddListenerInt(Defines.KeyGoldKey, (iValue) =>
            {
                m_txtGoldKey.text = iValue.ToString();
            });
            user_data.AddListenerInt(Defines.KeyCoin, (iValue) =>
            {
                m_txtCoin.text = iValue.ToString();
            });
            user_data.AddListenerInt(Defines.KeyGem, (iValue) =>
            {
                m_txtGem.text = iValue.ToString();
            });

#if UNITY_EDITOR
            /*
             * AddGem(debug_gem);
             * AddCoin(debug_coin);
             * AddKey(debug_key);
             * AddGoldKey(debug_gold_key);
             */
#endif
            //m_txtKey.text = user_data.ReadInt(Defines.KeyKey).ToString(); ;
            //m_txtGoldKey.text = user_data.Read(Defines.KeyGoldKey);
            //m_txtCoin.text = user_data.Read(Defines.KeyCoin);
            //m_txtGem.text = user_data.Read(Defines.KeyGem);
        }



        Initialized = true;
        Debug.Log("init_network end");
        yield return(null);
    }