재화 차감
플레이어의 재화를 차감 합니다.
호출 정보
CurrencySubtract(string currencyCode, long currencyAmount, PlayNANOODelegate callback) {}
호출 상세 정보
파라미터 | 설명 | 타입 |
---|---|---|
currencyCode | 재화 코드 | string |
currencyAmount | 재화 금액 | string |
callback | 통신 결과 | PlayNANOODelegate |
소스 코드
using PlayNANOO;
public class PlayNANOOExample : MonoBehaviour
{
Plugin plugin;
void Awake()
{
plugin = Plugin.GetInstance();
string currencyCode = "string";
long currencyAmount = 0;
plugin.CurrencySubtract(currencyCode, currencyAmount, (status, errorMessage, 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 |