查询货币
查询玩家持有的游戏内货币。
调用信息
CurrencyGet(String currencyCode, PlayNANOODelegate callback) {}
调用详细信息
| 参数 | 说明 | 类型 |
|---|---|---|
| currencyCode | 货币代码 | string |
| callback | 通信结果 | PlayNANOODelegate |
源代码
using PlayNANOO;
public class PlayNANOOExample : MonoBehaviour
{
Plugin plugin;
void Awake()
{
plugin = Plugin.GetInstance();
string currencyCode = "string";
plugin.CurrencyManager.Get(currencyCode, (status, errorCode, jsonString, values) => {
if (status.Equals(Configure.PN_API_STATE_SUCCESS))
{
Debug.Log(values["amount"]);
}
else
{
Debug.Log("Fail");
}
});
}
}
通信结果
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
{
"amount": 100
}
通信结果详细信息
| 数据键 | 说明 | 类型 |
|---|---|---|
| amount | 持有货币 | double |