예제 #1
0
    /// <summary>
    /// Returns true if the party has more or at least the number of resources given
    /// </summary>
    /// <param name="_item">The type of resource</param>
    /// <param name="_count">The count of resources we want to check for</param>
    /// <returns></returns>
    public bool HasEnoughResources(ScriptableObjects.Item _item, int _count)
    {
        if (m_resources[_item.name] >= _count)
        {
            return(true);
        }

        return(false);
    }
예제 #2
0
 /// <summary>
 /// Credit (add) the given amount of the given resources to the party invenntory
 /// </summary>
 /// <param name="_creditedItem">The item to credit</param>
 /// <param name="_amount">The amount of items to credit</param>
 public void CreditResource(ScriptableObjects.Item _creditedItem, int _amount = 1)
 {
     m_monInteger++;
     m_resources[_creditedItem.name] += _amount;
 }
예제 #3
0
 public void SetItem(ScriptableObjects.Item item)
 {
     m_item = item;
 }
예제 #4
0
 public void Drop(Vector3 _position)
 {
     m_item.Spawn(_position);
     m_item = null;
 }
예제 #5
0
 public void OnItemAction(ScriptableObjects.Item item)
 {
     text.text = item.name + "\n";
 }