Exemple #1
0
        public void Init()
        {
            ResourceStorage.DecompressMidiBundle();

            jsonStorage = new JsonStorage();
            jsonStorage.Load();

            uiState          = jsonStorage.Get(JsonStorageKeys.V1.UI_STATE, Storage.Protos.Json.V1.UiStateProto.CreateDefault());
            midiSynthConfigs = jsonStorage.Get(JsonStorageKeys.V1.MIDI_SYNTH_CONFIGS, Storage.Protos.Json.V1.MidiSynthConfigsProto.CreateDefault());
            gameplayConfig   = jsonStorage.Get(JsonStorageKeys.V1.GAMEPLAY_CONFIG, Storage.Protos.Json.V1.GameplayConfigProto.CreateDefault());
            appConfig        = jsonStorage.Get(JsonStorageKeys.V1.APP_CONFIG, Storage.Protos.Json.V1.AppConfigProto.CreateDefault());

            localDb = new LocalDb();
            localDb.Init();

            username = PlayerPrefs.GetString("TEMP_USERNAME", null);
            password = PlayerPrefs.GetString("TEMP_PASSWORD", null);

            netManager = new NetManager();
            netManager.Init(this);

            translationSevice = new TranslationService();
            translationSevice.Init(netManager);
            translationSevice.Load();
            translationSevice.lang = appConfig.displayLang;

            resourceStorage = new ResourceStorage();
            resourceStorage.Init(this);

            InitAudioConfig();
            ApplyAppAudioConfig();
        }
 public UrlRepository(JsonStorage storage)
 {
     _urls = new InMemoryCache <Hashtable>(() => storage.Get <Hashtable>("redirectUrls.json"), TimeSpan.FromDays(1));
 }