public void OnClickShop() { GUI_Dialog.InsertStack(guiShop.gameObject); GUI_Shop.GetInstance().RefreshInfo(); }
// Use this for initialization public void OnClickBack() { GUI_Dialog.ReleaseTopCanvas(); }
public void OnNoButton() { SoundManager.instance.PlayButton(); GUI_Dialog.ReleaseTopCanvas(); }
public void OnFreeCoins() { Debug.Log("[GemuCoinShopController] PlayUnityVideAds: Start"); SoundManager.instance.PlayButton(); GUI_Dialog.InsertStack(uiFreeCoins.gameObject); }
public void OnClickShopContent() { UIButton button = UIButton.current; if (button == null) { return; } Gamestate_Gameplay gs = GameObject.Find("Gamestate").GetComponent <Gamestate_Gameplay>(); if (gs == null) { return; } ShopContent content = button.transform.parent.gameObject.GetComponent <ShopContent> (); if (content.type == ShopContentType.IAP) { if (content.uniqueID == "freecoins") { GUI_Dialog.InsertStack(gemuFreeCoins.gameObject); //if ( GameDataManager.GetTimerToWatchAds() > GameDataManager.TIMER_TO_WATCH_ADS ) //{ //if (GameDataManager.PlayUnityVideoAd ()) { // StartCoroutine(ShowingAds()); //} else { // gs.ShowDialogBox ("Info", "Please wait...", false, "", this.gameObject); //} //} //else // gs.ShowDialogBox("Info","Please wait to watch the next ads.",false,"",this.gameObject); } else if (PlayerPrefs.HasKey("joystick." + content.uniqueID) == true) { PlayerPrefs.SetString("playerjoy", content.uniqueID); gs.SetJoystick(content.uniqueID); RefreshJoystickStatus(); } else if (PlayerPrefs.HasKey("claw." + content.uniqueID) == true) { PlayerPrefs.SetString("playerclaw", content.uniqueID); gs.SetClaw(content.uniqueID); RefreshClawStatus(); } else { currentShopContent = content; AndroidInAppPurchaseManager.instance.purchase(currentShopContent.uniqueID); //OnSuccessfulPurchase(currentShopContent.uniqueID); } } else if (content.type == ShopContentType.PowerUp) { int gemucoins = GameManager.GEMUCOINS; if (gemucoins - content.Price >= 0) { currentShopContent = content; gs.ShowDialogBox(content.Name, content.Desc + "\n\nDo you want to buy ?", true, "buypowerup", this.gameObject); //gs.achievementManager.OnAchievementEvent(AchievementType.PowerPlay,1); } else { gs.ShowDialogBox("Info", "Not enough coins", false, "confirm", this.gameObject); } } else if (content.type == ShopContentType.Claw) { if (PlayerPrefs.HasKey("claw." + content.uniqueID) == false) { int gemucoins = GameManager.GEMUCOINS; if (gemucoins - content.Price >= 0) { //currentShopContent = content; //gs.ShowDialogBox(content.Name,content.Desc+"Do you want to buy ?",true,"buyclaw",this.gameObject); PlayerPrefs.SetString("playerclaw", content.uniqueID); gs.SetClaw(content.uniqueID); RefreshClawStatus(); } else { //gs.ShowDialogBox("Info","Not enough GemuGold",false,"confirm",this.gameObject); } } else { PlayerPrefs.SetString("playerclaw", content.uniqueID); gs.SetClaw(content.uniqueID); RefreshClawStatus(); } } else if (content.type == ShopContentType.Joystick) { if (PlayerPrefs.HasKey("joystick." + content.uniqueID) == false) { int gemucoins = GameManager.GEMUCOINS; if (gemucoins - content.Price >= 0) { //currentShopContent = content; //gs.ShowDialogBox(content.Name,content.Desc+"Do you want to buy ?",true,"buyjoystick",this.gameObject); PlayerPrefs.SetString("playerjoy", content.uniqueID); gs.SetJoystick(content.uniqueID); RefreshJoystickStatus(); } else { //gs.ShowDialogBox("Info","Not enough GemuGold",false,"confirm",this.gameObject); } } else { PlayerPrefs.SetString("playerjoy", content.uniqueID); gs.SetJoystick(content.uniqueID); RefreshJoystickStatus(); } } else if (content.type == ShopContentType.FreeCoin) { int gemucoins = GameManager.GEMUCOINS; if (gemucoins - content.Price >= 0) { currentShopContent = content; gs.ShowDialogBox(content.Name, "Do you want to buy ?", true, "buyenergy", this.gameObject); } else { gs.ShowDialogBox("Info", "Not enough GemuGold", false, "confirm", this.gameObject); } } else { gs.ShowNotImplemented(); } PlayerPrefs.Save(); }
public void OnSettingsButton() { SoundManager.instance.PlayButton(); GUI_Dialog.InsertStack(canvasSettings.gameObject); }
public void OnPromoButton() { GUI_Dialog.InsertStack(cvPromo.gameObject); }
public void OnLoginButton() { SoundManager.instance.PlayButton(); GUI_Dialog.InsertStack(canvasLogin.gameObject); }
public void OnTicketsButton() { SoundManager.instance.PlayButton(); GUI_Dialog.InsertStack(canvasTickets.gameObject); }
/* * public void ReleaseTopCanvas() * { * if (activeCanvasStack.Count > 0) * { * GameObject canvasGo = activeCanvasStack.Pop (); * canvasGo.GetComponent<GUI_Dialog>().Hide(); * } * } */ public void OnCoinShopButton() { SoundManager.instance.PlayButton(); GUI_Dialog.InsertStack(canvasCoinShop.gameObject); }
public void OnClickBack() { SoundManager.instance.PlayButton(); GUI_Dialog.ReleaseTopCanvas(); this.gameObject.SetActive(false); }
public void OnRegisterButton() { SoundManager.instance.PlayButton(); GUI_Dialog.InsertStack(RegisterGemu.gameObject); }