예제 #1
0
 void LateUpdate()
 {
     if (Source)
     {
         AudioListener3D target = AudioListener3D.Current;
         if (!target)
         {
             target = Source.gameObject.AddComponent <AudioListener3D>();
         }
         target.enabled = Source.enabled;
         target.Paused  = AudioListener.pause;
         if (duality)
         {
             AudioListener3D.volume = AudioListener.volume;
         }
         else if (AudioListener.volume != AudioSourceSpoofer.Mute)
         {
             AudioListener3D.volume = AudioListener.volume;
             AudioListener.volume   = AudioSourceSpoofer.Mute;
         }
     }
     else
     {
         if (AudioListener3D.Current)
         {
             Destroy(AudioListener3D.Current);
         }
         Destroy(this);
     }
 }
예제 #2
0
 void Start()
 {
     AudioListener3D.EnvironmentSize = new Vector3(100, 100, 100);
     if (LevelSelectorObject)   // This is the menu
     {
         _SelectSound = SelectSound;
         if (KioskMode)
         {
             Destroy(ExitButton);
         }
         if (!LeapMotion.Instance.Connected)
         {
             LeapCalibrationText.text = "Leap Motion not found";
             LeapCalibrationText.gameObject.GetComponent <Button>().interactable = false;
         }
         LevelSelectorStep = LevelSelectorPlace.transform.position - LevelSelectorHide.transform.position;
         MaxLevel          = LevelSelectorObject.transform.childCount - 1;
         Calibration.Instance.gameObject.SetActive(false);
         Calibration.Instance.CalibrationResult += ApplyCalibration;
         Settings.LeapSetup();
         CavernText.text = "Cavern output: " + AudioListener3D.GetLayoutName();
     }
 }