// Token: 0x06000CFA RID: 3322 RVA: 0x00009A7D File Offset: 0x00007C7D
 private void Start()
 {
     this._rememberPassword = CmunePrefs.ReadKey <bool>(CmunePrefs.Key.Player_AutoLogin);
     if (this._rememberPassword)
     {
         this._password     = CmunePrefs.ReadKey <string>(CmunePrefs.Key.Player_Password);
         this._emailAddress = CmunePrefs.ReadKey <string>(CmunePrefs.Key.Player_Email);
     }
 }
Example #2
0
    // Token: 0x060007EB RID: 2027 RVA: 0x0003662C File Offset: 0x0003482C
    public void Initialize()
    {
        string @string = PlayerPrefs.GetString("Version", "Invalid");
        bool   flag    = false;

        if ("4.7.1" != @string)
        {
            flag = true;
            CmunePrefs.Reset();
            QualitySettings.SetQualityLevel(2, true);
            PlayerPrefs.SetString("Version", "4.7.1");
        }
        Application.targetFrameRate     = -1;
        QualitySettings.maxQueuedFrames = -1;
        this.IsUsingCustom  = CmunePrefs.ReadKey <bool>(CmunePrefs.Key.Options_VideoIsUsingCustom, this.IsUsingCustom);
        this.VideoWaterMode = CmunePrefs.ReadKey <int>(CmunePrefs.Key.Options_VideoWaterMode, this.VideoWaterMode);
        if ((Application.platform == RuntimePlatform.OSXPlayer || Application.platform == RuntimePlatform.OSXWebPlayer || Application.platform == RuntimePlatform.IPhonePlayer || Application.platform == RuntimePlatform.Android) && this.VideoWaterMode == 2)
        {
            this.VideoWaterMode = 1;
        }
        this.VideoTextureQuality    = CmunePrefs.ReadKey <int>(CmunePrefs.Key.Options_VideoTextureQuality, this.VideoTextureQuality);
        this.VideoVSyncCount        = CmunePrefs.ReadKey <int>(CmunePrefs.Key.Options_VideoVSyncCount, this.VideoVSyncCount);
        this.VideoAntiAliasing      = CmunePrefs.ReadKey <int>(CmunePrefs.Key.Options_VideoAntiAliasing, this.VideoAntiAliasing);
        this.VideoQualityLevel      = CmunePrefs.ReadKey <int>(CmunePrefs.Key.Options_VideoCurrentQualityLevel, this.VideoQualityLevel);
        this.VideoBloomAndFlares    = CmunePrefs.ReadKey <bool>(CmunePrefs.Key.Options_VideoBloomAndFlares, this.VideoBloomAndFlares);
        this.VideoVignetting        = CmunePrefs.ReadKey <bool>(CmunePrefs.Key.Options_VideoColorCorrection, this.VideoVignetting);
        this.VideoMotionBlur        = CmunePrefs.ReadKey <bool>(CmunePrefs.Key.Options_VideoMotionBlur, this.VideoMotionBlur);
        this.VideoShowFps           = CmunePrefs.ReadKey <bool>(CmunePrefs.Key.Options_VideoShowFps, this.VideoShowFps);
        this.VideoPostProcessing    = CmunePrefs.ReadKey <bool>(CmunePrefs.Key.Options_VideoPostProcessing, this.VideoPostProcessing);
        this.IsFullscreen           = CmunePrefs.ReadKey <bool>(CmunePrefs.Key.Options_VideoIsFullscreen, true);
        this.ScreenResolution       = CmunePrefs.ReadKey <int>(CmunePrefs.Key.Options_VideoScreenRes, ScreenResolutionManager.CurrentResolutionIndex);
        this.InputXMouseSensitivity = Mathf.Clamp(CmunePrefs.ReadKey <float>(CmunePrefs.Key.Options_InputXMouseSensitivity, 3f), 1f, 10f);
        this.InputYMouseSensitivity = Mathf.Clamp(CmunePrefs.ReadKey <float>(CmunePrefs.Key.Options_InputYMouseSensitivity, 3f), 1f, 10f);
        this.InputMouseRotationMaxX = CmunePrefs.ReadKey <float>(CmunePrefs.Key.Options_InputMouseRotationMaxX, 360f);
        this.InputMouseRotationMaxY = CmunePrefs.ReadKey <float>(CmunePrefs.Key.Options_InputMouseRotationMaxY, 90f);
        this.InputMouseRotationMinX = CmunePrefs.ReadKey <float>(CmunePrefs.Key.Options_InputMouseRotationMinX, -360f);
        this.InputMouseRotationMinY = CmunePrefs.ReadKey <float>(CmunePrefs.Key.Options_InputMouseRotationMinY, -90f);
        this.InputInvertMouse       = CmunePrefs.ReadKey <bool>(CmunePrefs.Key.Options_InputInvertMouse, false);
        bool flag2 = CmunePrefs.ReadKey <bool>(CmunePrefs.Key.Options_InputEnableGamepad, false);

        AutoMonoBehaviour <InputManager> .Instance.IsGamepadEnabled = (Input.GetJoystickNames().Length > 0 && flag2);
        this.GameplayAutoPickupEnabled = CmunePrefs.ReadKey <bool>(CmunePrefs.Key.Options_GameplayAutoPickupEnabled, true);
        this.GameplayAutoEquipEnabled  = CmunePrefs.ReadKey <bool>(CmunePrefs.Key.Options_GameplayAutoEquipEnabled, false);
        this.AudioEnabled       = CmunePrefs.ReadKey <bool>(CmunePrefs.Key.Options_AudioEnabled, true);
        this.AudioEffectsVolume = CmunePrefs.ReadKey <float>(CmunePrefs.Key.Options_AudioEffectsVolume, 0.7f);
        this.AudioMusicVolume   = CmunePrefs.ReadKey <float>(CmunePrefs.Key.Options_AudioMusicVolume, 0.5f);
        this.AudioMasterVolume  = CmunePrefs.ReadKey <float>(CmunePrefs.Key.Options_AudioMasterVolume, 0.5f);
        if (flag)
        {
            this.SaveApplicationOptions();
        }
    }