protected override void Awake() { base.Awake(); settingsMenu = GetComponentInParent <GameSettingsMenu>(); settingsManager = Engine.GetService <IStateManager>(); }
public void Start() { _settings = userSettingsManager.ReadSettings(); _settingMenuLayer = settingsMenu.GetComponent <GameSettingsMenu>(); _settingMenuLayer.EffectsVolume = _settings.EffectsVolume; _settingMenuLayer.MusicVolume = _settings.MusicVolume; _settingMenuLayer.OnMusicVolumeSliderChanged.AddListener(OnMusicVolumeSliderChanged); _settingMenuLayer.OnEffectsVolumeSliderChanged.AddListener(OnEffectsVolumeSliderChanged); EnableMenu(null); gameController.OnGameStateChanged.AddListener(OnGameStateChanged); }