コード例 #1
0
        protected override void Awake()
        {
            base.Awake();

            settingsMenu    = GetComponentInParent <GameSettingsMenu>();
            settingsManager = Engine.GetService <IStateManager>();
        }
コード例 #2
0
 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);
 }