private void OnGetWallet(EzWallet wallet) { if (walletValue != null) { walletValue.text = originalWalletValueText .Replace("{wallet_value}", (wallet.Free + wallet.Paid).ToString()); } }
private void WithdrawAction( EzWallet wallet, int amount ) { _wallet = wallet; onWatchWalletEvent.Invoke(_wallet); }
public EzGetResult( GetWalletResult result ) { if (result.item != null) { Item = new EzWallet(result.item); } }
private void DepositAction( EzWallet wallet, float price, int amount ) { _wallet = wallet; onWatchWalletEvent.Invoke(_wallet); }
public EzWithdrawResult( WithdrawResult result ) { if (result.item != null) { Item = new EzWallet(result.item); } if (result.price.HasValue) { Price = result.price.Value; } }
/// <summary> /// 課金通貨のウォレットを取得 /// </summary> /// <returns></returns> private IEnumerator GetWalletTask() { yield return(controller.GetWallet( r => { wallet = r.Result.Item; _animator.SetTrigger(r.Error == null ? Trigger.GetWalletSucceed.ToString() : Trigger.GetWalletFailed.ToString()); } )); }
/// <summary> /// ウォレットウィジェット でストアの表示ボタンが押されたときに呼び出される。 /// </summary> /// <param name="wallet"></param> public void OnShowMoneyStore( EzWallet wallet ) { Debug.Log("MoneyStoreDirector::OnShowMoneyStore"); void OnCloseStore() { storeWidget.onChoiceSalesItem.RemoveListener(OnBuyMoney); storeWidget.onClose.RemoveListener(OnCloseStore); } storeWidget.Initialize( _showcaseWatcher ); storeWidget.onChoiceSalesItem.AddListener(OnBuyMoney); storeWidget.onClose.AddListener(OnCloseStore); storeWidget.gameObject.SetActive(true); }
public static IEnumerator Withdraw( Client client, GameSession session, string moneyNamespaceName, EzWallet wallet, int value, bool paidOnly, WithdrawEvent onWithdraw, GetWalletEvent onGetWallet, ErrorEvent onError ) { AsyncResult <EzWithdrawResult> result = null; yield return(client.Money.Withdraw( r => { result = r; }, session, moneyNamespaceName, wallet.Slot, value, paidOnly )); if (result.Error != null) { onError.Invoke( result.Error ); yield break; } wallet = result.Result.Item; onWithdraw.Invoke(wallet, value); onGetWallet.Invoke(wallet); }
public IEnumerator Refresh() { void RefreshMoneyAction( EzWallet wallet ) { _wallet = wallet; _onGetWallet.RemoveListener(RefreshMoneyAction); onWatchWalletEvent.Invoke(_wallet); } _onGetWallet.AddListener(RefreshMoneyAction); yield return(MoneyController.GetWallet( _client, _session, _moneyNamespaceName, _slot, _onGetWallet, _onError )); }