Exemple #1
0
 private void Update()
 {
     if (isInit)
     {
         isInInventory = inventoryR.CheckIfItemIsInInventory(item);
     }
     if (isInInventory && interactions.isNear && Input.GetKeyDown(KeyCode.Z))
     {
         // I have to find the index and get rid of it
         inventoryR.GetRidOfIemsAndAmount(item, amount);
         interactions.questText.SetActive(true);
         interactions.questText.GetComponentInChildren <Text>().text = " Thank you for finding my Item!";
         interactions.CompletedQuest();
         item          = null;
         isInInventory = false;
         isInit        = false;
     }
 }