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")); }
public static void LoadConfigs() { JsonWriter.SHIELD_CN = false; FileUtil.Instance().SetBasePath("Resources/config/"); TextAsset textAsset = AssetDatabase.LoadAssetAtPath("Assets/Resources/config/config_cell.json", typeof(TextAsset)) as TextAsset; config_cell = JsonMapper.ToObject <config_cell>(textAsset.text); textAsset = AssetDatabase.LoadAssetAtPath("Assets/Resources/config/config_wall.json", typeof(TextAsset)) as TextAsset; config_wall = JsonMapper.ToObject <config_wall>(textAsset.text); textAsset = AssetDatabase.LoadAssetAtPath("Assets/Resources/config/config_map.json", typeof(TextAsset)) as TextAsset; config_map = JsonMapper.ToObject <config_map>(textAsset.text); textAsset = AssetDatabase.LoadAssetAtPath("Assets/Resources/config/config_cover.json", typeof(TextAsset)) as TextAsset; config_cover = JsonMapper.ToObject <config_cover>(textAsset.text); textAsset = AssetDatabase.LoadAssetAtPath("Assets/Resources/config/config_monster.json", typeof(TextAsset)) as TextAsset; config_monster = JsonMapper.ToObject <config_monster>(textAsset.text); textAsset = AssetDatabase.LoadAssetAtPath("Assets/Resources/config/config_prop.json", typeof(TextAsset)) as TextAsset; config_prop = JsonMapper.ToObject <config_prop>(textAsset.text); textAsset = AssetDatabase.LoadAssetAtPath("Assets/Resources/config/config_module.json", typeof(TextAsset)) as TextAsset; config_module = JsonMapper.ToObject <config_module>(textAsset.text); textAsset = AssetDatabase.LoadAssetAtPath("Assets/Resources/config/config_guide.json", typeof(TextAsset)) as TextAsset; config_guide = JsonMapper.ToObject <config_guide>(textAsset.text); textAsset = AssetDatabase.LoadAssetAtPath("Assets/Resources/config/config_chapter.json", typeof(TextAsset)) as TextAsset; config_chapter = JsonMapper.ToObject <config_chapter>(textAsset.text); textAsset = AssetDatabase.LoadAssetAtPath("Assets/Resources/config/config_wealth.json", typeof(TextAsset)) as TextAsset; config_wealth = JsonMapper.ToObject <config_wealth>(textAsset.text); textAsset = AssetDatabase.LoadAssetAtPath("Assets/Resources/config/config_skill.json", typeof(TextAsset)) as TextAsset; config_skill = JsonMapper.ToObject <config_skill>(textAsset.text); textAsset = AssetDatabase.LoadAssetAtPath("Assets/Resources/config/config_sort.json", typeof(TextAsset)) as TextAsset; config_sort = JsonMapper.ToObject <config_sort>(textAsset.text); }