Example #1
0
    private IEnumerator init_network()
    {
        GetAgingState();

        gameData.SetSaveFilename(Defines.FILENAME_GAMEDATA);
        if (false == gameData.Load())
        {
            // なんか初期化する必要あるなら
        }
        if (!user_data.HasKey(Defines.KEY_SOUNDVOLUME_BGM))
        {
            Debug.Log("not haskey:Defines.KEY_SOUNDVOLUME_BGM");
            user_data.WriteFloat(Defines.KEY_SOUNDVOLUME_BGM, 0.8f);
        }
        if (!user_data.HasKey(Defines.KEY_SOUNDVOLUME_SE))
        {
            Debug.Log("not haskey:Defines.KEY_SOUNDVOLUME_SE");
            user_data.WriteFloat(Defines.KEY_SOUNDVOLUME_SE, 0.8f);
        }

        // master
        masterChara.Load(masterTextAssets.Get("master_chara"));
        masterCharaCard.Load(masterTextAssets.Get("master_chara_card"));

        masterStage.Load(masterTextAssets.Get("master_stage"));
        masterCard.Load(masterTextAssets.Get("master_card"));
        masterCardSymbol.Load(masterTextAssets.Get("master_card_symbol"));

        masterItem.Load(masterTextAssets.Get("master_item"));
        masterStageItem.Load(masterTextAssets.Get("master_stage_item"));
        masterStageCard.Load(masterTextAssets.Get("master_card"));

        masterSkill.Load(masterTextAssets.Get("master_skill"));
        masterCampItem.Load(masterTextAssets.Get("master_campitem"));
        masterCampShop.Load(masterTextAssets.Get("master_campshop"));
        masterLevelup.Load(masterTextAssets.Get("master_levelup"));
        masterHelp.Load(masterTextAssets.Get("master_help"));
        // data
        dataStage.SetSaveFilename(Defines.FILENAME_DATA_STAGE);
        dataUnitCamp.SetSaveFilename(Defines.FILENAME_UNIT_CAMP);
        dataUnitGame.SetSaveFilename(Defines.FILENAME_UNIT_GAME);
        dataSkill.SetSaveFilename(Defines.FILENAME_SKILL_CAMP);
        dataItem.SetSaveFilename(Defines.FILENAME_ITEM_CAMP);
        dataCard.SetSaveFilename(Defines.FILENAME_CARD_CAMP);

        dataCampItem.SetSaveFilename(Defines.FILENAME_ITEM_CAMP);
        dataPresent.SetSaveFilename(Defines.FILENAME_DATA_PRESENT);

        if (false == dataUnitCamp.LoadMulti())
        {
            dataUnitCamp.MakeInitialData(masterChara.list);
            dataUnitCamp.Save();
            //yield return StartCoroutine(dataUnitCamp.SpreadSheet(SS_TEST, "unit", () => { }));
        }
        if (false == dataSkill.LoadMulti())
        {
            dataSkill.MakeInitialData();
            dataSkill.Save();
        }
        //yield return StartCoroutine(dataItem.SpreadSheet(SS_TEST, "item", () => { }));

        if (false == dataCampItem.LoadMulti())
        {
            dataCampItem.list.Clear();
            dataCampItem.Save();
            //yield return StartCoroutine(dataCampItem.SpreadSheet(SS_TEST, "campitem", () => { }));
        }
        if (false == dataItem.LoadMulti())
        {
            dataItem.list.Clear();
            dataItem.Save();
        }

        if (false == dataStage.LoadMulti())
        {
            // まだデータなし
            dataStage.Save();
        }

        if (false == dataCard.LoadMulti())
        {
            dataCard.Reset(dataUnitCamp.list, masterCard.list, masterCharaCard.list);
            dataCard.Save();
        }

        if (false == dataPresent.LoadMulti())
        {
            dataPresent.Save();
        }

        yield return(null);

        Initialized = true;
    }
Example #2
0
    private IEnumerator init_network()
    {
        //Debug.Log(config.ReadInt("stage_id"));
        if (!user_data.HasKey(Defines.KEY_SOUNDVOLUME_BGM))
        {
            Debug.Log("not haskey:Defines.KEY_SOUNDVOLUME_BGM");
            user_data.WriteFloat(Defines.KEY_SOUNDVOLUME_BGM, 0.8f);
        }
        if (!user_data.HasKey(Defines.KEY_SOUNDVOLUME_SE))
        {
            Debug.Log("not haskey:Defines.KEY_SOUNDVOLUME_SE");
            user_data.WriteFloat(Defines.KEY_SOUNDVOLUME_SE, 0.8f);
        }
        if (!user_data.HasKey(Defines.KEY_GAMESPEED))
        {
            Debug.Log("not haskey:Defines.KEY_GAMESPEED");
            user_data.WriteInt(Defines.KEY_GAMESPEED, 0);
        }
        game_speed_index = user_data.ReadInt(Defines.KEY_GAMESPEED);
        SetGameSpeed(game_speed_index);
        //Debug.Log(user_data.ReadFloat(Defines.KEY_SOUNDVOLUME_BGM));
        //Debug.Log(user_data.ReadFloat(Defines.KEY_SOUNDVOLUME_SE));


        gameData.SetSaveFilename(Defines.FILENAME_GAMEDATA);
        if (false == gameData.LoadMulti())
        {
            gameData.AddInt(Defines.KEY_MP, 0);
            gameData.AddInt(Defines.KEY_MP_MAX, 30);
        }
        GetAgingState();

        masterStage.Load(data_holder.Get("master_stage"));
        masterCorridor.Load(data_holder.Get("master_corridor"));
        masterCorridorEvent.Load(data_holder.Get("master_corridor_event"));

        masterCard.Load(data_holder.Get("master_card"));
        masterCardSymbol.Load(data_holder.Get("master_card_symbol"));

        masterChara.Load(data_holder.Get("master_chara"));
        masterCharaCard.Load(data_holder.Get("master_chara_card"));

        masterItem.Load(data_holder.Get("master_item"));
        masterStageWave.Load(data_holder.Get("master_stage_wave"));
        masterStageEvent.Load(data_holder.Get("master_stage_event"));
        masterStageItem.Load(data_holder.Get("master_stage_item"));
        masterStageCard.Load(data_holder.Get("master_stage_card"));
        masterStageMission.Load(data_holder.Get("master_stage_mission"));
        masterStageEnemy.Load(data_holder.Get("master_stage_enemy"));
        masterStageBattleBonus.Load(data_holder.Get("master_stage_bb"));
        masterStageShopItem.Load(data_holder.Get("master_stage_shopitem"));

        masterSkill.Load(data_holder.Get("master_skill"));
        masterSkillEffect.Load(data_holder.Get("master_skill_effect"));

        masterBattleBonus.Load(data_holder.Get("master_bb"));

        masterMission.Load(data_holder.Get("master_mission"));
        masterMissionDetail.Load(data_holder.Get("master_mission_detail"));
        masterHelp.Load(data_holder.Get("master_help"));

        yield return(null);

        dataCorridor.SetSaveFilename(Defines.FILENAME_DATA_CORRIDOR);
        dataUnit.SetSaveFilename(Defines.FILENAME_UNIT_GAME);
        dataSkill.SetSaveFilename(Defines.FILENAME_SKILL_GAME);
        dataItem.SetSaveFilename(Defines.FILENAME_ITEM_GAME);
        dataCard.SetSaveFilename(Defines.FILENAME_CARD_GAME);

        dataStage.SetSaveFilename(Defines.FILENAME_DATA_STAGE);

        if (false == dataUnit.LoadMulti())
        {
            dataUnit.MakeInitialData(masterChara.list);
        }
        if (false == dataSkill.LoadMulti())
        {
            //yield return StartCoroutine(dataSkill.SpreadSheet(SS_TEST, "skill", () => { }));
        }
        if (false == dataItem.LoadMulti())
        {
            //yield return StartCoroutine(dataItem.SpreadSheet(SS_TEST, "item", () => { }));
        }
        if (false == dataStage.LoadMulti())
        {
            Debug.LogError("no data stage");
        }
        if (false == dataCard.LoadMulti())
        {
        }
        if (false == dataCorridor.LoadMulti())
        {
        }

        Initialized = true;
    }