private void chargeSucceeded() { float credit = float.Parse(UserManager.CurrentMoney) + WalletScript.LastCredit; UnityThreadHelper.Dispatcher.Dispatch(() => { // Payment Completed isBackAfterPayment = false; selectWinMoney(); EventsController nbs = new EventsController(); nbs.ShowPopup("popupCongrat"); UserManager.CurrentMoney = credit.ToString(); EncartPlayerPresenter.Init(); Text TextMain = GameObject.Find("TextMain").GetComponent <Text>(); TextMain.text = credit + CurrencyManager.CURRENT_CURRENCY; Text lastCreditValue = GameObject.Find("lastCreditValue").GetComponent <Text>(); lastCreditValue.text = "(+" + WalletScript.LastCredit.ToString("N2") + CurrencyManager.CURRENT_CURRENCY + ")"; try { SceneManager.UnloadScene("Loader"); } catch (Exception ex) { } SceneManager.UnloadScene("BankingInformation"); }); }
public void ShowScene(string sceneName) { /*foreach (Transform child in _container.transform) { * if (child.name != sceneName) { * child.gameObject.SetActive (false); * } * else child.gameObject.SetActive (true); * }*/ currentView = sceneName; EncartPlayerPresenter.Init(); }