Interface IWalletDataLayer
Contract for objects providing data to the IWalletManager.
Namespace: UnityEngine.GameFoundation
Syntax
public interface IWalletDataLayer
Methods
AddBalance(String, Int64, Completer<Int64>)
Increase the balance for the given key
Declaration
void AddBalance(string key, long value, Completer<long> completer)
Parameters
Type | Name | Description |
---|---|---|
String | key | The identifier of the currency to update. |
Int64 | value | The amount to add. |
Completer<Int64> | completer | The operation result. |
GetData()
Get Wallet's serializable data.
Declaration
WalletData GetData()
Returns
Type | Description |
---|---|
WalletData | The player's data for the IWalletManager. |
RemoveBalance(String, Int64, Completer<Int64>)
Decrease the balance for the given key
Declaration
void RemoveBalance(string key, long value, Completer<long> completer)
Parameters
Type | Name | Description |
---|---|---|
String | key | The identifier of the currency to update. |
Int64 | value | The amount to remove. |
Completer<Int64> | completer | The operation result. |
SetBalance(String, Int64, Completer)
Defines a new balance for the given key
Declaration
void SetBalance(string key, long value, Completer completer)
Parameters
Type | Name | Description |
---|---|---|
String | key | The identifier of the currency to update. |
Int64 | value | The new balance. |
Completer | completer | The operation result. |