void GiveCoinToUserAfterWatchingAds() { int jmlCoinsNow = PlayerPrefs.GetInt(PlayerPrefHandler.keyCoin); jmlCoinsNow += 1; PlayerPrefs.SetInt(PlayerPrefHandler.keyCoin, jmlCoinsNow); GameManager.GEMUCOINS = jmlCoinsNow; if (CoinTimerHandler.instance) { CoinTimerHandler.instance.countCoin = jmlCoinsNow; } Gamestate_Gameplay gs = GameObject.FindGameObjectWithTag("Gamestate").GetComponent <Gamestate_Gameplay>(); if (gs) { gs.RefreshAllInfo(); gs.guiIngame.guiShop.RefreshInfo(); } dialogBox.Show("Info", "You got 1 GemuGold.", false, "", this.gameObject); /*GameDataManager.instance.SendPlayResult( * GameDataManager.instance.gameID.ToString(),"0", * jmlCoinsNow.ToString(), * GameManager.EXP.ToString(), * GameManager.getLevelValue().ToString());*/ GL1Connector.GetInstance().AddBalance(this.gameObject, "", "1", "", "ADS"); }
public void OnClickAddFund() { GameManager.GEMUCOINS += 200; Gamestate_Gameplay gs = GameObject.FindGameObjectWithTag("Gamestate").GetComponent <Gamestate_Gameplay>(); gs.RefreshAllInfo(); GUI_Dialog.ReleaseTopCanvas(); }
private void OnRatePopUpClose(AndroidDialogResult result) { switch (result) { case AndroidDialogResult.RATED: PlayerPrefs.SetInt(PlayerPrefHandler.keyRateUs, 1); buttonRateUs.gameObject.SetActive(false); int jmlCoinsNow = PlayerPrefs.GetInt(PlayerPrefHandler.keyCoin); jmlCoinsNow += 5; PlayerPrefs.SetInt(PlayerPrefHandler.keyCoin, jmlCoinsNow); GL1Connector.GetInstance().AddBalance(this.gameObject, "0", "5", "", "RATE"); /*int jmlTiketNow = PlayerPrefs.GetInt(PlayerPrefHandler.keyUserTiket); * jmlTiketNow += 100; * PlayerPrefs.SetInt(PlayerPrefHandler.keyUserTiket, jmlTiketNow);*/ if (CoinTimerHandler.instance) { CoinTimerHandler.instance.countCoin = jmlCoinsNow; } /*GameDataManager.instance.SendPlayResult( * GameDataManager.instance.gameID.ToString(),"100", * jmlCoinsNow.ToString(), * GameManager.EXP.ToString(), * GameManager.getLevelValue().ToString());*/ Gamestate_Gameplay gs = GameObject.FindGameObjectWithTag("Gamestate").GetComponent <Gamestate_Gameplay>(); if (gs) { gs.RefreshAllInfo(); gs.guiIngame.guiShop.RefreshInfo(); } dialogBox.Show("Info", "You got 5 GemuGold.", false, "", this.gameObject); break; case AndroidDialogResult.REMIND: break; case AndroidDialogResult.DECLINED: break; } //AN_PoupsProxy.showMessage("Result", result.ToString() + " button pressed"); }