Exemplo n.º 1
0
    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.");
        }
    }
Exemplo n.º 2
0
 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!");
         }
     }
 }
Exemplo n.º 3
0
 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;
         }
     }
 }
Exemplo n.º 4
0
    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.");
            }
        }
    }