public void Open() { if (!_isAvailable && !IsDragging) { return; } _menuIsOpen = true; IconClickAnimation.Stop(); IconClickAnimation.Play(); UpArrowAnimation.Stop(); UpArrowAnimation.Play(); LeftArrowAnimation.Stop(); LeftArrowAnimation.Play(); Show(); RootTranslation.Stop(); RootTranslation.Play(); if (_useSoundFader) { _soundFader.gameObject.SetActive(true); SoundAlphaAnimation.Stop(); SoundAlphaAnimation.Play(); } Initialize(); EnableElements(true, TweenTime); }
public void Close() { if (!_isAvailable && !IsDragging) { return; } _menuIsOpen = false; IconClickAnimation.Stop(); IconClickAnimation.Reverse(); UpArrowAnimation.Stop(); UpArrowAnimation.Reverse(); LeftArrowAnimation.Stop(); LeftArrowAnimation.Reverse(); if (_discrete) { TurnDiscrete(); } RootTranslation.Stop(); RootTranslation.Reverse(); if (_useSoundFader) { SoundAlphaAnimation.Stop(); SoundAlphaAnimation.Reverse(() => _soundFader.gameObject.SetActive(false)); } Initialize(); EnableElements(false, TweenTime); }