示例#1
0
 /// <summary>
 /// Закрвает инвентарь
 /// </summary>
 public void OnInventoryClose()
 {
     Time.timeScale = 1f;
     gameObject.SetActive(false);
     inventory.InventoryIsClosed();
     audio.PlayExitButton();
 }
示例#2
0
        public IEnumerator InventoryAudioPlayExitButtonTest()
        {
            game = MonoBehaviour.Instantiate(Resources.Load <GameObject>("Game"));
            yield return(new WaitForSecondsRealtime(1f));

            audio = GameObject.Find("UI").GetComponent <InventoryAudio>();
            yield return(new WaitForSecondsRealtime(1f));

            audio.PlayExitButton();
            yield return(new WaitForSecondsRealtime(0.001f));

            Assert.IsTrue(audio.Source.clip.name == "Звук нажатия кнопки");
        }