public void TakeAllItemsFromWaitingList() { List <Item> items = _lootModel.waitingItems[0]; if (_inventoryController.AddInventoryItems(items)) { foreach (Item item in items) { _questLogController.CheckGoal(item.name); } _lootModel.TakeAllItems(); } else { _notification.ActiveOk("There is no space in your inventory."); } }
private void OnTriggerStay(Collider other) { if (other.gameObject.tag == "Player" && Input.GetButtonDown("Interact")) { if (_inventoryController.ContainsItem(key) && door != null) { door.SetActive(false); _inventoryController.RemoveItem(key); } else { _notification.ActiveOk("You dont have key!"); } } }
private void OnTriggerStay(Collider other) { if (other.gameObject.tag == "Player" && Input.GetButtonDown("Interact") && !questLogController.IsQuestTaken(quest)) { if (NotificationText != "") { notification.ActiveOk(NotificationText); } questLogController.AddQuest(quest); if (_questionMark != null) { _questionMark.enabled = false; } } }
public void UseItem(EquipmentSlot equipmentSlot) { Item item = equipmentSlot.GetItem(); if (item != null) { if (_inventoryController.GetItemsCount() != _inventoryController.GetInventorySize()) { item.UnEquip(); _equipmentModel.RemoveItem(item); _inventoryController.AddInventoryItem(item); } else if (_notification.IsFree()) { _notification.ActiveOk("There is no space in your inventory."); } } }