private void OnEnable() { AudioSliderValue = AudioListener.volume; if (SettingsData.Settings != null) { Difficulty = SettingsData.Settings != null ? Engine.Difficulty.Medium : SettingsData.Settings.Difficulty; } EventManager.StartListening(EventsNames.PauseMenuEvent, PauseMenuAction); }
public static void SettingsChangeEvent(Engine.Difficulty difficulty) { Debug.Log("SettingsChange Event"); EventManager.TriggerEvent(SettingsEvent, new EventParam { TypeOfEvent = EventResponseType.GameManagerEvent, Response = new SettingsResponse { Difficulty = difficulty } }); }
public Settings(float volume, int height, int width, int refreshRate, int vSync, int antiAliasing, int textureQuality, bool isFullscreen, bool isFpsIsShowed, Engine.Difficulty difficulty) { this.volume = volume; this.height = height; this.width = width; this.refreshRate = refreshRate; this.vSync = vSync; this.antiAliasing = antiAliasing; this.textureQuality = textureQuality; this.isFullscreen = isFullscreen; this.isFpsIsShowed = isFpsIsShowed; this.difficulty = difficulty; }