Beispiel #1
0
    private void InitConfigs()
    {
        config_cell = JsonMapper.ToObject <config_cell>(GetTextString("config/config_cell"));

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

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

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

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

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

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

        config_guide = JsonMapper.ToObject <config_guide>(GetTextString("config/config_guide"));

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

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

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

        config_sort = JsonMapper.ToObject <config_sort>(GetTextString("config/config_sort"));
    }
Beispiel #2
0
    private IEnumerator LoadConfigs()
    {
        WWW www = new WWW(sourceArtPath + "config/config_cell.json");

        yield return(www);

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

        www = new WWW(sourceArtPath + "config/config_wall.json");
        yield return(www);

        config_wall = JsonMapper.ToObject <config_wall>(www.text);

        www = new WWW(sourceArtPath + "config/config_map.json");
        yield return(www);

        config_map = JsonMapper.ToObject <config_map>(www.text);

        www = new WWW(sourceArtPath + "config/config_cover.json");
        yield return(www);

        config_cover = JsonMapper.ToObject <config_cover>(www.text);

        www = new WWW(sourceArtPath + "config/config_monster.json");
        yield return(www);

        config_monster = JsonMapper.ToObject <config_monster>(www.text);
    }
Beispiel #3
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"));
    }
Beispiel #4
0
    void Awake()
    {
        GridMain.resourceMgr = this;

        Caching.CleanCache();
        sourceArtPath  = "file:///" + Application.dataPath + "/sourceArt/";
        abRootPath     = "file:///" + Application.dataPath + "/StreamingAssets/mobile/";
        config_cell    = null;
        config_wall    = null;
        config_map     = null;
        config_cover   = null;
        config_monster = null;

        manifestDic = new Dictionary <string, AssetBundleManifest>();
        abDic       = new Dictionary <string, AssetBundle>();

        StartCoroutine(LoadCommonRes());
    }
Beispiel #5
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);
    }