private void OnEnable() { if (!_silentPopup) { GetComponent <SoundHandler>().PlayOneShot(); } else { _silentPopup = false; } if (Opened != null) { _previousPopup = Opened; Opened = this; _previousPopup.Close(); } else { Opened = this; } if (lowpassMusic) { MusicMaster.Lowpass(true); } DimmerHandler.Switch(true); }
private void Start() { _contentPosition = new StoredInt(PrefContentPosition, 0); var position = content.position; position.y = _contentPosition.Value; content.position = position; MusicMaster.Play(Music.MainMenu); }
private void OnDisable() { MusicMaster.Lowpass(false); DimmerHandler.Switch(false); if (Opened == this) { Opened = null; } if (_previousPopup is null) { return; } _previousPopup.Open(true); _previousPopup = null; }
#pragma warning restore CS0649 private void Start() { playButton.onClick.AddListener(ClickPlay); MusicMaster.Play(Music.MainMenu); }