using PlayNANOO;
public class PlayNANOOExample : MonoBehaviour
{
Plugin plugin;
void Awake()
{
plugin = Plugin.GetInstance();
List<PlayNANOO.Currency.ItemModel> currencyItems = new List<PlayNANOO.Currency.ItemModel>();
currencyItems.Add(new PlayNANOO.Currency.ItemModel { currency_code = "CURRENCY_CODE", currency_amount = 100 });
currencyItems.Add(new PlayNANOO.Currency.ItemModel { currency_code = "CURRENCY_CODE", currency_amount = 100 });
plugin.CurrencyManager.Put(currencyItems, (status, errorMessage, jsonString, values) => {
if (status.Equals(Configure.PN_API_STATE_SUCCESS))
{
PlayNANOO.Currency.ItemModel[] items = values["Items"] as PlayNANOO.Currency.ItemModel[];
foreach (PlayNANOO.Currency.ItemModel item in items)
{
Debug.Log(item.currency_code);
Debug.Log(item.currency_amount);
}
}
else
{
Debug.Log("Fail");
}
});
}
}