Exemplo n.º 1
0
 private void OnEnable()
 {
     if (itemDrop == null || itemDrop.Equals(new GenericItem()))
     {
         Invoke("loadItem", 0.02f);
     }
 }
Exemplo n.º 2
0
    // Update is called once per frame
    void Update()
    {
        //Actualizar la info con el objeto seleccionado

        if (selectedItem != null && !selectedItem.Equals(new GenericItem()))
        {
            updateItemInfo();
        }
        else
        {
            cleanTexts();
        }

        if (Input.GetMouseButtonDown(0))
        {
            myEventSystem.SetSelectedGameObject(currentButton);
        }
        else if (Input.GetButtonDown("Cancel"))
        {
            if (inOptions)
            {
                cancelOptions();
            }
            else
            {
                management.closeInventory();
            }
        }
    }