コード例 #1
0
    private IEnumerator LoadConfigs()
    {
        yield return(StartCoroutine(LoadDependenciesAb("config/config_cell.ab")));

        config_cell = JsonMapper.ToObject <config_cell>(GetTextString("config/config_cell.ab", "config_cell"));

        yield return(StartCoroutine(LoadDependenciesAb("config/config_wall.ab")));

        config_wall = JsonMapper.ToObject <config_wall>(GetTextString("config/config_wall.ab", "config_wall"));

        yield return(StartCoroutine(LoadDependenciesAb("config/config_map.ab")));

        config_map = JsonMapper.ToObject <config_map>(GetTextString("config/config_map.ab", "config_map"));

        yield return(StartCoroutine(LoadDependenciesAb("config/config_cover.ab")));

        config_cover = JsonMapper.ToObject <config_cover>(GetTextString("config/config_cover.ab", "config_cover"));

        yield return(StartCoroutine(LoadDependenciesAb("config/config_monster.ab")));

        config_monster = JsonMapper.ToObject <config_monster>(GetTextString("config/config_monster.ab", "config_monster"));

        yield return(StartCoroutine(LoadDependenciesAb("config/config_prop.ab")));

        config_prop = JsonMapper.ToObject <config_prop>(GetTextString("config/config_prop.ab", "config_prop"));

        yield return(StartCoroutine(LoadDependenciesAb("config/config_module.ab")));

        config_module = JsonMapper.ToObject <config_module>(GetTextString("config/config_module.ab", "config_module"));

        yield return(StartCoroutine(LoadDependenciesAb("config/config_guild.ab")));

        config_guild = JsonMapper.ToObject <config_guild>(GetTextString("config/config_guild.ab", "config_guild"));

        yield return(StartCoroutine(LoadDependenciesAb("config/config_chapter.ab")));

        config_chapter = JsonMapper.ToObject <config_chapter>(GetTextString("config/config_chapter.ab", "config_chapter"));

        yield return(StartCoroutine(LoadDependenciesAb("config/config_wealth.ab")));

        config_wealth = JsonMapper.ToObject <config_wealth>(GetTextString("config/config_wealth.ab", "config_wealth"));

        yield return(StartCoroutine(LoadDependenciesAb("config/config_skill.ab")));

        config_skill = JsonMapper.ToObject <config_skill>(GetTextString("config/config_skill.ab", "config_skill"));

        yield return(StartCoroutine(LoadDependenciesAb("config/config_sort.ab")));

        config_sort = JsonMapper.ToObject <config_sort>(GetTextString("config/config_sort.ab", "config_sort"));
    }
コード例 #2
0
    public static void LoadConfigs()
    {
        JsonWriter.SHIELD_CN = false;
        FileUtil.Instance().SetBasePath("sourceArt/config/");

        TextAsset textAsset = AssetDatabase.LoadAssetAtPath("Assets/sourceArt/config/config_cell.json", typeof(TextAsset)) as TextAsset;

        config_cell = JsonMapper.ToObject <config_cell>(textAsset.text);

        textAsset   = AssetDatabase.LoadAssetAtPath("Assets/sourceArt/config/config_wall.json", typeof(TextAsset)) as TextAsset;
        config_wall = JsonMapper.ToObject <config_wall>(textAsset.text);

        textAsset  = AssetDatabase.LoadAssetAtPath("Assets/sourceArt/config/config_map.json", typeof(TextAsset)) as TextAsset;
        config_map = JsonMapper.ToObject <config_map>(textAsset.text);

        textAsset    = AssetDatabase.LoadAssetAtPath("Assets/sourceArt/config/config_cover.json", typeof(TextAsset)) as TextAsset;
        config_cover = JsonMapper.ToObject <config_cover>(textAsset.text);

        textAsset      = AssetDatabase.LoadAssetAtPath("Assets/sourceArt/config/config_monster.json", typeof(TextAsset)) as TextAsset;
        config_monster = JsonMapper.ToObject <config_monster>(textAsset.text);

        textAsset   = AssetDatabase.LoadAssetAtPath("Assets/sourceArt/config/config_prop.json", typeof(TextAsset)) as TextAsset;
        config_prop = JsonMapper.ToObject <config_prop>(textAsset.text);

        textAsset     = AssetDatabase.LoadAssetAtPath("Assets/sourceArt/config/config_module.json", typeof(TextAsset)) as TextAsset;
        config_module = JsonMapper.ToObject <config_module>(textAsset.text);

        textAsset    = AssetDatabase.LoadAssetAtPath("Assets/sourceArt/config/config_guild.json", typeof(TextAsset)) as TextAsset;
        config_guild = JsonMapper.ToObject <config_guild>(textAsset.text);

        textAsset      = AssetDatabase.LoadAssetAtPath("Assets/sourceArt/config/config_chapter.json", typeof(TextAsset)) as TextAsset;
        config_chapter = JsonMapper.ToObject <config_chapter>(textAsset.text);

        textAsset     = AssetDatabase.LoadAssetAtPath("Assets/sourceArt/config/config_wealth.json", typeof(TextAsset)) as TextAsset;
        config_wealth = JsonMapper.ToObject <config_wealth>(textAsset.text);

        textAsset    = AssetDatabase.LoadAssetAtPath("Assets/sourceArt/config/config_skill.json", typeof(TextAsset)) as TextAsset;
        config_skill = JsonMapper.ToObject <config_skill>(textAsset.text);

        textAsset   = AssetDatabase.LoadAssetAtPath("Assets/sourceArt/config/config_sort.json", typeof(TextAsset)) as TextAsset;
        config_sort = JsonMapper.ToObject <config_sort>(textAsset.text);
    }