Skip to main content

Inventory.AddFunds

Declaration#

public virtual RefusalReason AddFunds(Int32 amount, bool raiseEvents)

Parameters#

NameDescription
amountTotal value to add
raiseEventsRaise associated event(s)

Description#

Add non-preimum funds to inventory

Usage#

using NullSave.GDTK.Inventory;using UnityEngine;
public class Example : MonoBehaviour{
    public void ExampleMethod(Inventory target)    {        target.AddFunds(102, true);    }
}

Declaration#

public virtual RefusalReason AddFunds(string id, Int32 count, bool raiseEvents)

Parameters#

NameDescription
idId of the currency to add
countNumber of that currency to add
raiseEventsRaise associated event(s)

Description#

Add non-preimum funds to inventory

Usage#

using NullSave.GDTK.Inventory;using UnityEngine;
public class Example : MonoBehaviour{
    public void ExampleMethod(Inventory target)    {        target.AddFunds(InventoryDatabase.instance.currencies[0].info.id, 5, true);    }
}