Пример #1
0
 void Update()
 {
     if (Input.GetButtonDown("Menu"))
     {
         if (CST.activeSelf)
         {
             Screen.Reset();
             CST.SetActive(false);
             AudioSource.PlayClipAtPoint(MenuClosed, Camera.main.transform.position);
         }
         else
         {
             CST.SetActive(true);
             AudioSource.PlayClipAtPoint(MenuOpen, Camera.main.transform.position);
             if (GameObject.FindGameObjectWithTag("Equipper").GetComponent <InventoryScreen>())
             {
                 InventoryScreen screen = GameObject.FindGameObjectWithTag("Equipper").GetComponent <InventoryScreen>();
                 screen.SetInventoryVisually(Inv);
             }
         }
     }
 }