private void OnEnable() { if (itemDrop == null || itemDrop.Equals(new GenericItem())) { Invoke("loadItem", 0.02f); } }
// 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(); } } }