예제 #1
0
    public void Initialize()
    {
        m_EntityConfig.Clear();
        var e = LoadJsonObject.CreateObjectFromResource <Dictionary <string, JEntityConfig> >("Config/Entity/PlayerConfig");

        CopyConfig(e.Keys.GetEnumerator(), e.Values.GetEnumerator());
    }
예제 #2
0
 void Save(string fileName)
 {
     if (m_Curve != null && m_Name != "")
     {
         JAnimationCurveData data = new JAnimationCurveData(m_Name, m_Curve);
         LoadJsonObject.WriteJsonFromObject(data, Path.Combine(basePath, fileName));
     }
 }
예제 #3
0
    void LoadRoomContentConfig()
    {
        var e = LoadJsonObject.CreateObjectFromResource <Dictionary <string, JRoomContentConfig> >("Config/Level/RoomContentConfig").GetEnumerator();

        while (e.MoveNext())
        {
            string name = e.Current.Key.ToLower();
            e.Current.Value.name = name;
            m_SourceConfigs.Add(name, e.Current.Value);
        }
    }
예제 #4
0
    public void Initialize()
    {
        m_LevelConfigs = new Dictionary <int, JLevelConfig>();
        var e = LoadJsonObject.CreateObjectFromResource <Dictionary <int, string> >("Config/Level/LevelConfig").GetEnumerator();

        while (e.MoveNext())
        {
            JLevelConfig levelConfig = LoadJsonObject.CreateObjectFromResource <JLevelConfig>(e.Current.Value);
            levelConfig.index = e.Current.Key;
            m_LevelConfigs.Add(e.Current.Key, levelConfig);
        }
    }
예제 #5
0
파일: UIManager.cs 프로젝트: c2001324/Leo
    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

    private void LoadConfig()
    {
        foreach (var config in LoadJsonObject.CreateObjectFromResource <JWindowConfig[]>("Config/UIConfig"))
        {
            if (m_UIWindowConfigs.ContainsKey(config.name))
            {
                Debug.LogError("已存在相同项 " + config.name);
            }
            else
            {
                m_UIWindowConfigs.Add(config.name, config);
            }
        }
    }
예제 #6
0
    AnimationCurve LoadAcByPath(FileInfo file)
    {
        JAnimationCurveData data = LoadJsonObject.CreateObjectFromStreamingAssets <JAnimationCurveData>(file.FullName);

        return(new AnimationCurve(data.keyDatas));
    }
예제 #7
0
 public void Initialize()
 {
     m_Texts = LoadJsonObject.CreateObjectFromResource <JCustomTextConfigs>("Config/CustomTextConfigs");
 }
예제 #8
0
    public static void LoadConfig()
    {
        ConfigInstance config = LoadJsonObject.CreateObjectFromResource <ConfigInstance>("Config/Config");

        config.ParseToConfig();
    }