Interface IWalletManager
Manages the player currency balances.
Namespace: UnityEngine.GameFoundation
Syntax
public interface IWalletManager
Methods
Add(Currency, Int64)
Increases the balance of the specified Currency.
Declaration
bool Add(Currency currency, long balance)
Parameters
Type | Name | Description |
---|---|---|
Currency | currency | The currency you want to increase the balance. |
Int64 | balance | The amount to add to the balance. |
Returns
Type | Description |
---|---|
Boolean |
|
Get(Currency)
Gets the balance of the specified Currency.
Declaration
long Get(Currency currency)
Parameters
Type | Name | Description |
---|---|---|
Currency | currency | The currency you want the balance of. |
Returns
Type | Description |
---|---|
Int64 | The balance of the specified currency. |
Remove(Currency, Int64)
Decreases the balance of the specified Currency.
Declaration
bool Remove(Currency currency, long balance)
Parameters
Type | Name | Description |
---|---|---|
Currency | currency | The currency you want to decrease the balance. |
Int64 | balance | The amount to remove to the balance. |
Returns
Type | Description |
---|---|
Boolean |
|
Set(Currency, Int64)
Sets the balance of the specified Currency.
Declaration
bool Set(Currency currency, long balance)
Parameters
Type | Name | Description |
---|---|---|
Currency | currency | The currency you want to set the balance. |
Int64 | balance | The amount to add to the balance. |
Returns
Type | Description |
---|---|
Boolean |
|
Events
balanceChanged
Triggered every time a balance is modified, whether added, removed, or set.
Declaration
event Action<IQuantifiable, long> balanceChanged
Event Type
Type | Description |
---|---|
Action<IQuantifiable, Int64> |