Example #1
0
 private void ResumeMusicAfterMenuClosed(OnMenuClosed data)
 {
     if (isPlayerInDungeon)
     {
         musicSpeaker.clip = dungeonMusic;
         musicSpeaker.PlayDelayed(2);
         musicSpeaker.loop = true;
     }
     else
     {
         musicSpeaker.clip = fightMusic;
         musicSpeaker.Play();
     }
 }
Example #2
0
 public void CloseAll()
 {
     selected = false;
     if (dummyParent)
     {
         dummyParent.CloseAll();
         Destroy(dummyParent.gameObject);
         dummyParent = null;
         if (OnMenuClosed != null)
         {
             OnMenuClosed.Invoke();
         }
     }
 }
Example #3
0
        public void HideMenu()
        {
            if (_isLoading && ProjectData.GameMode != GameMode.View)
            {
                _openAfterLoad = false;
                Loader.StopLoaderAnimation();

                return;
            }

            BrowserWindow.SetActive(false);
            OnMenuClosed?.Invoke();
            ModeButton.SetActive(false);
        }
 public void CloseAll()
 {
     selected = false;
     if (dummyParent)
     {
         dummyParent.CloseAll();
         Destroy(dummyParent.gameObject);
         dummyParent = null;
         laserPointer.maxReticleDistance = reticleDistance;
         if (OnMenuClosed != null)
         {
             OnMenuClosed.Invoke();
         }
     }
 }
Example #5
0
 /// <summary>
 /// Triggers the OnMenuClosed event. Should only be used by overrides of <see cref="CloseMenuRoutine"/>
 /// </summary>
 protected void InvokeOnMenuClosed()
 {
     OnMenuClosed?.Invoke();
 }