Beispiel #1
0
 private void AssignPlayerPrefs()
 {
     SaveManager.AddData("qualityPreset", cQualityPreset);
     SaveManager.AddData("textureQuality", cTextureQuality);
     SaveManager.AddData("anisTextureQuality", cAnisotrophicTextureQuality);
     SaveManager.AddData("vSync", cVsync);
     SaveManager.AddData("realtimeReflections", cRealtimeReflections);
 }
 internal static void Save(object unused = null, QuitEventArgs e = null)
 {
     if (e != null)
     {
         if (e.quitReason == QuitEventArgs.QuitReason.error)
         {
             return;
         }
     }
     SaveManager.AddData(Inputs.Jump.ToString(), JumpKC.ToString());
     SaveManager.AddData(Inputs.Crouch.ToString(), CrouchKC.ToString());
     SaveManager.AddData(Inputs.FireGrapple.ToString(), FireGrappleKC.ToString());
     SaveManager.AddData(Inputs.Fire.ToString(), FireKC.ToString());
     SaveManager.AddData(Inputs.Aim.ToString(), AimKC.ToString());
     SaveManager.AddData(Inputs.QuickSwitch.ToString(), QuickSwitchKC.ToString());
     SaveManager.AddData(Inputs.UnEquip.ToString(), UnEquipKC.ToString());
     SaveManager.AddData(Inputs.QuickMelee.ToString(), QuickMeleeKC.ToString());
     SaveManager.AddData(Inputs.ThrowGrenade.ToString(), ThrowGrenadeKC.ToString());
     SaveManager.Save();
 }
Beispiel #3
0
        private void Start()
        {
            #region general loading

            gameplayManager         = new GameplayManager();
            ApplicationQuitRequest += OnApplicationRequestQuit;

            #endregion

            #region scene initialization

            EnvironmentController.environmentSoundType = EnvironmentController.SoundType.closed;
            AudioHandler.Init();

            #endregion

            #region load and handle control scheme

            if ((int)SaveManager.Load(SaveManager.DataType.dint, "LGO").data == 0) // game has never been launched, 1 = launched
            {
                Debug.Log("Game is launching for the first time. Assigning default settings...");
                SaveManager.AddData("LGO", 1);
                InputHandler.AssignDefaults();
                InputHandler.Save();
            }

            InputHandler.Status status = InputHandler.Load();
            if (status == InputHandler.Status.ok)
            {
                Debug.Log("Found control scheme.");
            }
            else if (status == InputHandler.Status.notfound)
            {
                Debug.LogWarning("Control scheme not found, falling back to defaults...");
                InputHandler.AssignDefaults();
            }
            else if (status == InputHandler.Status.noparse)
            {
                Debug.LogWarning("Control scheme could not be parsed correctly, falling back to defaults...");
                InputHandler.AssignDefaults();
            }

            #endregion

            #region Discord Rich Presence and Multiplayer controller

            MasterDRPController tdrp;
            if (useDRP)
            {
                if (TryGetComponent <MasterDRPController>(out tdrp))
                {
                    masterDRPController = tdrp;
                }
                else
                {
                    masterDRPController = gameObject.AddComponent <MasterDRPController>();
                }
                masterDRPController.Initialize(new Discord.Activity
                {
                    State   = initialState,
                    Details = initialDetail
                });
            }

            #endregion
        }
Beispiel #4
0
 internal static void SaveVolume()
 {
     SaveManager.AddData("masterAudio", MasterVolume); SaveManager.Save();
 }