Пример #1
0
 public AlertPopUp Initialize()
 {
     _childrenController   = gameObject.AddComponent <ChildrenControllerComponent>();
     _basePopupComponent   = gameObject.GetComponent <BasePopupComponent>();
     _onCloseEndedDelegate = OnCloseEnded;
     _basePopupComponent.Initialize(_onCloseEndedDelegate);
     _messageText = GetComponentsInChildren <Text>(true)[0];
     return(this);
 }
Пример #2
0
 public SettingsMenu Initialize(bool tutorialForced)
 {
     if (!_audioSetUp)
     {
         Messenger.Publish(new RequestAudioStateMessage());
     }
     _effectsSlider.maxValue = LocalConfig.EffectsSlider.MaxValue;
     _effectsSlider.minValue = LocalConfig.EffectsSlider.MinValue;
     _musicSlider.maxValue   = LocalConfig.MusicSlider.MaxValue;
     _musicSlider.minValue   = LocalConfig.MusicSlider.MinValue;
     _tutoriaToggle.isOn     = tutorialForced;
     _onCloseEndedDelegate   = OnCloseEnded;
     _basePopupComponent     = gameObject.GetComponent <BasePopupComponent>();
     _basePopupComponent.Initialize(_onCloseEndedDelegate);
     return(this);
 }