Ejemplo n.º 1
0
    public static void LoadData(this ISaveAsJson source, JSON mainData)
    {
        if (!mainData.ContainsKey(source.Key))
        {
            return;
        }
        JSON loadData = mainData.GetJSON(source.Key);

        if (!mainData.ContainsKey(source.Key))
        {
            return;
        }
        if (IsOldVersion(source, loadData))
        {
            source.UpdateSaveData(loadData);
        }
        source.Load(loadData);
    }