/// <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); }
/// <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; }
public void SetItem(ScriptableObjects.Item item) { m_item = item; }
public void Drop(Vector3 _position) { m_item.Spawn(_position); m_item = null; }
public void OnItemAction(ScriptableObjects.Item item) { text.text = item.name + "\n"; }