/// <summary> /// Закрвает инвентарь /// </summary> public void OnInventoryClose() { Time.timeScale = 1f; gameObject.SetActive(false); inventory.InventoryIsClosed(); audio.PlayExitButton(); }
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 == "Звук нажатия кнопки"); }