Exemplo n.º 1
0
    public BiologProgress(IGameData gameData, BiologLoadingProcess loadingProcess)
    {
        _unlockedEntries = new List <BiologEntry>();
        _dataStorage     = new TransientDataStorage();// PersistentDataStorage("biologProgress.txt");
        _dataStorage.ReadData();

        switch (loadingProcess)
        {
        case BiologLoadingProcess.UnlockAll:
            foreach (BiologEntry entry in gameData.BiologData.Entries)
            {
                _unlockedEntries.Add(entry);
            }
            break;

        case BiologLoadingProcess.UnlockNone:
            break;

        case BiologLoadingProcess.UseProgressData:
            _unlockedEntries = new List <BiologEntry>();

            _dataStorage = new TransientDataStorage();    //new PersistentDataStorage("biologProgress.txt");
            _dataStorage.ReadData();

            foreach (KeyValuePair <string, object> value in _dataStorage)
            {
                _unlockedEntries.Add(gameData.BiologData.Entries.Find((e) => e.EntryName.Equals(value.Key)));
            }
            break;
        }
    }
Exemplo n.º 2
0
    public BiologProgress(IGameData gameData)
    {
        _unlockedEntries = new List <BiologEntry>();

        _dataStorage = new TransientDataStorage();//"biologProgress.txt");
        _dataStorage.ReadData();

        foreach (KeyValuePair <string, object> value in _dataStorage)
        {
            _unlockedEntries.Add(gameData.BiologData.Entries.Find((e) => e.EntryName.Equals(value.Key)));
        }
    }