Esempio n. 1
0
 public void ClosePanel()
 {
     foreach (GameObject UI_Object in UI_Objects)
     {
         UI_Object.SetActive(false);
     }
 }
Esempio n. 2
0
    public void Update()
    {
        if (Input.GetKeyDown(KeyCode.Escape))
        {
            foreach (GameObject UI_Object in UI_Objects)
            {
                UI_Object.SetActive(false);
            }
        }

        if (SofaPickUp && Input.GetKeyDown("e") && Player.position.x <= 5 && Player.position.x >= -5 && Player.position.y <= 2.5 && Player.position.y >= -3)
        {
            sofa.SetActive(true);
            Sofa.position = Player.position;
            Vector3 placevector = Sofa.position;
            if (Player.position.y > 2)
            {
                placevector.y = placevector.y - 1;
            }
            else
            {
                placevector.y = placevector.y + 1;
            }
            Player.position = placevector;
            SofaPickUp      = false;
        }
    }