public SavegameLocalStorage(
            ILogger logger,
            ISavegameConfig savegameConfig)
        {
            _logger = logger;
            var basePath = UnityEngine.Application.persistentDataPath;

            _fullFilePath = Path.Combine(basePath, savegameConfig.Filename);
        }
Beispiel #2
0
        public SavegameService(
            ILogger logger,
            ISavegameFactory savegameFactory,
            ISavegameConfig savegameConfig,
            ISavegameReader savegameReader,
            ISavegameWriter savegameWriter)
        {
            _logger          = logger;
            _savegameFactory = savegameFactory;
            _savegameConfig  = savegameConfig;
            _savegameReader  = savegameReader;
            _savegameWriter  = savegameWriter;

            _saveDisposer       = new SerialDisposable().AddTo(Disposer);
            _requestSaveTimeout = TimeSpan.FromSeconds(_savegameConfig.RequestSaveTimeoutSeconds);
        }