Added controls for gamepad, changed input & UI

This commit is contained in:
TAASONI3
2023-07-04 20:15:06 +02:00
parent 0b058f9248
commit 7aba856b17
48 changed files with 24176 additions and 15427 deletions

View File

@@ -34,20 +34,7 @@ namespace Assets.Scripts
public void deleteItem()
{
InventorySlot toDelete = GameObject.Find("Inventory").GetComponent<Inventory>().getDrag().GetComponent<InventorySlot>();
if (toDelete.place == ItemPlace.BAG)
{
GameObject.Find("QuestLog").GetComponent<QuestLog>().updateQuests("collect", toDelete.getItem(toDelete.getCurrentBag()), -1);
toDelete.removeItem();
}
else
{
GameObject.Find("QuestLog").GetComponent<QuestLog>().updateQuests("collect", toDelete.getEquip(), -1);
toDelete.removeEquip();
}
GameObject.Find("Inventory").GetComponent<Inventory>().dragImage.GetComponent<RawImage>().color = new Color(0, 0, 0, 0);
GameObject.Find("Inventory").GetComponent<Inventory>().dragImage.GetComponent<RawImage>().texture = null;
GameObject.Find("Inventory").GetComponent<Inventory>().dragImage.transform.position = new Vector3(0, 0, 0);
}
}
}