Example #1
0
 public void SaveTurn()
 {
     gameData.Save();
     dataCorridor.Save();
     dataCard.Save();
     dataUnit.Save();
     dataItem.Save();
     dataSkill.Save();
     dataStage.Save();
     GameMain.Instance.battleMain.dataCardEnemy.Save(Defines.FILENAME_CARD_ENEMY);
 }
Example #2
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;
    }