private void OnPurchaseSucceded(Purchase purchase) { Debug.Log("Purchase succeded: " + purchase.Sku + "; Payload: " + purchase.DeveloperPayload); switch (purchase.Sku) { case SKU_10: ProtectedPrefs.SetInt("Coins", ProtectedPrefs.GetInt("Coins") + 10000); break; case SKU_50: ProtectedPrefs.SetInt("Coins", ProtectedPrefs.GetInt("Coins") + 50000); break; case SKU_100: ProtectedPrefs.SetInt("Coins", ProtectedPrefs.GetInt("Coins") + 100000); break; case SKU_Life: ProtectedPrefs.SetInt("mLamp", ProtectedPrefs.GetInt("mLamp") + 10); break; default: Debug.LogWarning("Unknown SKU: " + purchase.Sku); break; } }
void InstansShow() { switch (bonuseNumber) { case 1: ProtectedPrefs.SetInt("Coins", coinsc2 + 250); break; case 2: ProtectedPrefs.SetInt("mBook", BookCount + 3); break; case 3: ProtectedPrefs.SetInt("mPipe", PipeCount + 2); break; case 4: ProtectedPrefs.SetInt("mEmerald", EmeraldCount + 4); break; case 5: ProtectedPrefs.SetInt("mGold", GoldCount + 2); break; default: ProtectedPrefs.SetInt("Coins", coinsc2 + 100); break; } buttonBon.SetActive(false); ProtectedPrefs.Save(); }
public void DoubleUp() { if (ProtectedPrefs.GetInt("Coins") >= 750 && dcLevel == 0) { ProtectedPrefs.SetInt("d_LvL", 1); ProtectedPrefs.SetInt("Coins", ProtectedPrefs.GetInt("Coins") - 750); } else if (ProtectedPrefs.GetInt("Coins") >= 2500 && dcLevel == 1) { ProtectedPrefs.SetInt("d_LvL", 2); ProtectedPrefs.SetInt("Coins", ProtectedPrefs.GetInt("Coins") - 2500); } else if (ProtectedPrefs.GetInt("Coins") >= 5000 && dcLevel == 2) { ProtectedPrefs.SetInt("d_LvL", 3); ProtectedPrefs.SetInt("Coins", ProtectedPrefs.GetInt("Coins") - 5000); } else if (ProtectedPrefs.GetInt("Coins") >= 7500 && dcLevel == 3) { ProtectedPrefs.SetInt("d_LvL", 4); ProtectedPrefs.SetInt("Coins", ProtectedPrefs.GetInt("Coins") - 7500); } else if (ProtectedPrefs.GetInt("Coins") >= 10000 && dcLevel == 4) { ProtectedPrefs.SetInt("d_LvL", 5); ProtectedPrefs.SetInt("Coins", ProtectedPrefs.GetInt("Coins") - 10000); } }
void AdCallbackhandler(ShowResult result) { switch (result) { case ShowResult.Finished: Debug.Log("Ad Finished. Rewarding player..."); if (freecoin) { ProtectedPrefs.SetInt("Coins", ProtectedPrefs.GetInt("Coins") + 500); freecoin = false; } else { InstansShow(); } break; case ShowResult.Skipped: Debug.Log("Ad skipped. Son, I am dissapointed in you"); break; case ShowResult.Failed: Debug.Log("I swear this has never happened to me before"); break; } }
private void GameOver() { showAd = true; GameOverPanel.SetActive(true); powerPanel.SetActive(false); ProtectedPrefs.SetInt("Coins", lcoin + coin); goCoin.text = "Coins: " + coin.ToString(); goScore.text = "Score: " + Controller.Distance.ToString("f0") + "0"; if (Controller.Distance > ProtectedPrefs.GetFloat("HighScore")) { ProtectedPrefs.SetFloat("HighScore", Controller.Distance); } if (ProtectedPrefs.HasKey("HighScore")) { goBScore.text = "Best Score: " + ProtectedPrefs.GetFloat("HighScore").ToString("f0") + "0"; } else { goBScore.text = "Best Score: " + Controller.Distance.ToString("f0") + "0"; } if (FB.IsLoggedIn) { #if !UNITY_EDITOR StartCoroutine(Facebook.Unity.FBManager.SetScore()); #endif } }
public void Out() { login = false; ProtectedPrefs.SetInt("login", 0); FB.LogOut(); UIFBLogin.SetActive(false); UIFBNotLogin.SetActive(true); }
public void noADS() { if (ProtectedPrefs.GetInt("Coins") >= 999000 && ProtectedPrefs.GetInt("bunner") == 0) { ProtectedPrefs.SetInt("bunner", 1); ProtectedPrefs.SetInt("Coins", ProtectedPrefs.GetInt("Coins") - 999000); } }
public void SaveLife() { SaveLifePanel.SetActive(false); ProtectedPrefs.SetInt("mLamp", lCount - 1); Controller.iDie = false; SaveMe = true; lifesave = false; GetLamp(); MainMenuPanel.SetActive(true); timerl = 0; sl.fillAmount = 1; }
void Start() { //ProtectedPrefs.SetInt("Coins", 50000000); animationManager = this.GetComponent <AnimationManager>(); store = false; curObjectNumber = 0; knifSelect = capSelect = otherSelect = false; if (!ProtectedPrefs.HasKey("Characters")) { ProtectedPrefs.SetInt("Characters", 0); ProtectedPrefs.SetInt("Cap", 0); ProtectedPrefs.SetInt("Character1", 1); ProtectedPrefs.SetInt("Cap1", 1); } }
public void DealWithFBMenu(bool isLoggedIn) { if (isLoggedIn) { UIFBLogin.SetActive(true); UIFBNotLogin.SetActive(false); login = true; ProtectedPrefs.SetInt("login", 1); } else { UIFBLogin.SetActive(false); UIFBNotLogin.SetActive(true); login = false; ProtectedPrefs.SetInt("login", 0); } }
void Start() { doubleCoin = false; cointimer = 0f; if (!ProtectedPrefs.HasKey("mBook")) { ProtectedPrefs.SetInt("mBook", 0); } if (!ProtectedPrefs.HasKey("mPipe")) { ProtectedPrefs.SetInt("mPipe", 0); } if (!ProtectedPrefs.HasKey("mEmerald")) { ProtectedPrefs.SetInt("mEmerald", 0); } if (!ProtectedPrefs.HasKey("mGold")) { ProtectedPrefs.SetInt("mGold", 0); } if (!ProtectedPrefs.HasKey("mKalyan")) { ProtectedPrefs.SetInt("mKalyan", 0); } if (!ProtectedPrefs.HasKey("mLamp")) { ProtectedPrefs.SetInt("mLamp", 0); } if (!ProtectedPrefs.HasKey("mRubin")) { ProtectedPrefs.SetInt("mRubin", 0); } if (!ProtectedPrefs.HasKey("mUrna")) { ProtectedPrefs.SetInt("mUrna", 0); } if (!ProtectedPrefs.HasKey("mVaza")) { ProtectedPrefs.SetInt("mVaza", 0); } }
void Awake() { if (!ProtectedPrefs.HasKey("mb")) { ProtectedPrefs.SetInt("mb", 0); } if (!ProtectedPrefs.HasKey("mp")) { ProtectedPrefs.SetInt("mp", 0); } if (!ProtectedPrefs.HasKey("me")) { ProtectedPrefs.SetInt("me", 0); } if (!ProtectedPrefs.HasKey("mg")) { ProtectedPrefs.SetInt("mg", 0); } if (!ProtectedPrefs.HasKey("mk")) { ProtectedPrefs.SetInt("mk", 0); } if (!ProtectedPrefs.HasKey("mr")) { ProtectedPrefs.SetInt("mr", 0); } if (!ProtectedPrefs.HasKey("mu")) { ProtectedPrefs.SetInt("mu", 0); } if (!ProtectedPrefs.HasKey("mv")) { ProtectedPrefs.SetInt("mv", 0); } if (!ProtectedPrefs.HasKey("cc")) { ProtectedPrefs.SetInt("cc", 0); } }
void Awake() { if (ProtectedPrefs.HasKey("Coins")) { coinGift = ProtectedPrefs.GetInt("Coins"); } this.Start((days) => { days++; switch (days) { case 1: giftText.text = "DAY 1: Your bonus + 300 Coin"; ProtectedPrefs.SetInt("Coins", coinGift + 300); giftProgress.size = 0.2f; break; case 2: giftText.text = "DAY 2: Your bonus + 900 Coin"; ProtectedPrefs.SetInt("Coins", coinGift + 900); giftProgress.size = 0.4f; break; case 3: giftText.text = "DAY 3: Your bonus + 1500 Coin"; ProtectedPrefs.SetInt("Coins", coinGift + 1500); giftProgress.size = 0.6f; break; case 4: giftText.text = "DAY 4: Your bonus + 2000 Coin"; ProtectedPrefs.SetInt("Coins", coinGift + 2000); giftProgress.size = 0.8f; break; case 5: giftText.text = "DAY 5: Your bonus + 5000 Coin"; ProtectedPrefs.SetInt("Coins", coinGift + 5000); giftProgress.size = 1.0f; break; } }, 5, new [] { "1 Day", "2 Day", "3 Day", "4 Day", "5 Day" }, new [] { "300 GOlD", "900 GOlD", "1500 GOlD", "2000 GOlD", "5000 GOlD" } ); }
public void BuyBtn() { if (charSelect) { if (charId == 1 && ProtectedPrefs.GetInt("Coins") >= 170000) { ProtectedPrefs.SetInt("Character2", 1); ProtectedPrefs.SetInt("Coins", (ProtectedPrefs.GetInt("Coins") - 170000)); animationManager.animationState = animationManager.Select; } else if (charId == 2 && ProtectedPrefs.GetInt("Coins") >= 1250000) { ProtectedPrefs.SetInt("Character3", 1); ProtectedPrefs.SetInt("Coins", (ProtectedPrefs.GetInt("Coins") - 1250000)); animationManager.animationState = animationManager.Select; } else if (charId == 3 && ProtectedPrefs.GetInt("Coins") >= 600000) { ProtectedPrefs.SetInt("Character4", 1); ProtectedPrefs.SetInt("Coins", (ProtectedPrefs.GetInt("Coins") - 600000)); animationManager.animationState = animationManager.Select; } } if (capSelect) { if (capId == 1 && ProtectedPrefs.GetInt("Coins") >= 70000) { ProtectedPrefs.SetInt("Cap2", 1); ProtectedPrefs.SetInt("Coins", (ProtectedPrefs.GetInt("Coins") - 70000)); animationManager.animationState = animationManager.Select; } else if (capId == 2 && ProtectedPrefs.GetInt("Coins") >= 105000) { ProtectedPrefs.SetInt("Cap3", 1); ProtectedPrefs.SetInt("Coins", (ProtectedPrefs.GetInt("Coins") - 105000)); animationManager.animationState = animationManager.Select; } else if (capId == 3 && ProtectedPrefs.GetInt("Coins") >= 140000) { ProtectedPrefs.SetInt("Cap4", 1); ProtectedPrefs.SetInt("Coins", (ProtectedPrefs.GetInt("Coins") - 140000)); animationManager.animationState = animationManager.Select; } } if (knifSelect) { if (knifeId == 0 && ProtectedPrefs.GetInt("Coins") >= 15000) { ProtectedPrefs.SetInt("Knife1", 1); ProtectedPrefs.SetInt("Coins", (ProtectedPrefs.GetInt("Coins") - 15000)); ProtectedPrefs.SetInt("mLamp", ProtectedPrefs.GetInt("mLamp") + 3); animationManager.animationState = animationManager.Select; } else if (knifeId == 1 && ProtectedPrefs.GetInt("Coins") >= 30000) { ProtectedPrefs.SetInt("Knife2", 1); ProtectedPrefs.SetInt("Coins", (ProtectedPrefs.GetInt("Coins") - 30000)); ProtectedPrefs.SetInt("mLamp", ProtectedPrefs.GetInt("mLamp") + 4); animationManager.animationState = animationManager.Select; } else if (knifeId == 2 && ProtectedPrefs.GetInt("Coins") >= 45000) { ProtectedPrefs.SetInt("Knife3", 1); ProtectedPrefs.SetInt("Coins", (ProtectedPrefs.GetInt("Coins") - 45000)); ProtectedPrefs.SetInt("mLamp", ProtectedPrefs.GetInt("mLamp") + 5); animationManager.animationState = animationManager.Select; } else if (knifeId == 3 && ProtectedPrefs.GetInt("Coins") >= 60000) { ProtectedPrefs.SetInt("Knife4", 1); ProtectedPrefs.SetInt("Coins", (ProtectedPrefs.GetInt("Coins") - 60000)); ProtectedPrefs.SetInt("mLamp", ProtectedPrefs.GetInt("mLamp") + 6); animationManager.animationState = animationManager.Select; } else if (knifeId == 4 && ProtectedPrefs.GetInt("Coins") >= 75000) { ProtectedPrefs.SetInt("Knife5", 1); ProtectedPrefs.SetInt("Coins", (ProtectedPrefs.GetInt("Coins") - 75000)); ProtectedPrefs.SetInt("mLamp", ProtectedPrefs.GetInt("mLamp") + 7); animationManager.animationState = animationManager.Select; } } if (otherSelect) { if (curObjectNumber == 0 && ProtectedPrefs.GetInt("Coins") >= 200000) { ProtectedPrefs.SetInt("Clock1", 1); ProtectedPrefs.SetInt("Coins", (ProtectedPrefs.GetInt("Coins") - 200000)); ProtectedPrefs.SetInt("ClockStart", 1); animationManager.animationState = animationManager.Select; } else if (curObjectNumber == 1 && ProtectedPrefs.GetInt("Coins") >= 1500000) { ProtectedPrefs.SetInt("Ak471", 1); ProtectedPrefs.SetInt("Coins", (ProtectedPrefs.GetInt("Coins") - 1500000)); ProtectedPrefs.SetInt("AkStart", 1); animationManager.animationState = animationManager.Select; } else if (curObjectNumber == 2 && ProtectedPrefs.GetInt("Coins") >= 350000) { ProtectedPrefs.SetInt("Oculus1", 1); ProtectedPrefs.SetInt("Coins", (ProtectedPrefs.GetInt("Coins") - 350000)); ProtectedPrefs.SetInt("SpectatesStart", 1); animationManager.animationState = animationManager.Select; } } }
public void SelectBtn() { if (charSelect) { if (charId == 0) { ProtectedPrefs.SetInt("Player", 1); animationManager.animationState = animationManager.Select; selectBtn.GetComponent <Button>().IsActive(); } else if (charId == 1) { ProtectedPrefs.SetInt("Player", 2); animationManager.animationState = animationManager.Select; selectBtn.GetComponent <Button>().IsActive(); } else if (charId == 2) { ProtectedPrefs.SetInt("Player", 3); animationManager.animationState = animationManager.Select; selectBtn.GetComponent <Button>().IsActive(); } else if (charId == 3) { ProtectedPrefs.SetInt("Player", 4); animationManager.animationState = animationManager.Select; selectBtn.GetComponent <Button>().IsActive(); } } if (capSelect) { if (capId == 0) { ProtectedPrefs.SetInt("Helmet", 1); animationManager.animationState = animationManager.Select; selectBtn.GetComponent <Button>().IsActive(); } else if (capId == 1) { ProtectedPrefs.SetInt("Helmet", 2); animationManager.animationState = animationManager.Select; selectBtn.GetComponent <Button>().IsActive(); } else if (capId == 2) { ProtectedPrefs.SetInt("Helmet", 3); animationManager.animationState = animationManager.Select; selectBtn.GetComponent <Button>().IsActive(); } else if (capId == 3) { ProtectedPrefs.SetInt("Helmet", 4); animationManager.animationState = animationManager.Select; selectBtn.GetComponent <Button>().IsActive(); } } if (knifSelect) { if (knifeId == 0) { ProtectedPrefs.SetInt("Whinger", 1); animationManager.animationState = animationManager.Select; selectBtn.GetComponent <Button>().IsActive(); } else if (knifeId == 1) { ProtectedPrefs.SetInt("Whinger", 2); animationManager.animationState = animationManager.Select; selectBtn.GetComponent <Button>().IsActive(); } else if (knifeId == 2) { ProtectedPrefs.SetInt("Whinger", 3); animationManager.animationState = animationManager.Select; selectBtn.GetComponent <Button>().IsActive(); } else if (knifeId == 3) { ProtectedPrefs.SetInt("Whinger", 4); animationManager.animationState = animationManager.Select; selectBtn.GetComponent <Button>().IsActive(); } else if (knifeId == 4) { ProtectedPrefs.SetInt("Whinger", 5); animationManager.animationState = animationManager.Select; selectBtn.GetComponent <Button>().IsActive(); } } if (otherSelect) { if (curObjectNumber == 0) { if (ProtectedPrefs.GetInt("ClockStart") != 1) { ProtectedPrefs.SetInt("ClockStart", 1); } else { ProtectedPrefs.SetInt("ClockStart", 0); } animationManager.animationState = animationManager.Select; selectBtn.GetComponent <Button>().IsActive(); } else if (curObjectNumber == 1) { if (ProtectedPrefs.GetInt("AkStart") != 1) { ProtectedPrefs.SetInt("AkStart", 1); } else { ProtectedPrefs.SetInt("AkStart", 0); } animationManager.animationState = animationManager.Select; selectBtn.GetComponent <Button>().IsActive(); } else if (curObjectNumber == 2) { if (ProtectedPrefs.GetInt("SpectatesStart") != 1) { ProtectedPrefs.SetInt("SpectatesStart", 1); } else { ProtectedPrefs.SetInt("SpectatesStart", 0); } animationManager.animationState = animationManager.Select; selectBtn.GetComponent <Button>().IsActive(); } } }
public void uMute() { ProtectedPrefs.SetInt("Mute", 1); bAudio.mute = false; }
public void Mute() { ProtectedPrefs.SetInt("Mute", 0); bAudio.mute = true; }
void OnTriggerEnter(Collider items) { if (items.gameObject.tag == "Coin") { Instantiate(prefCoinDie, new Vector3(transform.position.x + 1.5f, transform.position.y + 13F, transform.position.z + 5F), transform.rotation); if (!doubleCoin) { GameControll.coin++; } else { GameControll.coin = GameControll.coin + 2; } AudiosManager.instance.PlayingSound("Coin"); Destroy(items.gameObject); } if (items.gameObject.tag == "Magnet") { Instantiate(prefmagnetDie, new Vector3(transform.position.x, transform.position.y + 2F, transform.position.z + 15F), transform.rotation); if (Controller.iMagnet) { Controller.cM = Controller.cM - Controller.magnetTime; } else { Controller.iMagnet = true; mg(); } AudiosManager.instance.PlayingSound("Power"); Destroy(items.gameObject); } else if (items.gameObject.tag == "Kover") { if (Controller.iFly) { Controller.cF = Controller.cF - Controller.flyTime; } else { Controller.iFly = true; kv(); } AudiosManager.instance.PlayingSound("Power"); Destroy(items.gameObject); } else if (items.gameObject.tag == "Bots") { Instantiate(preftapDie, new Vector3(transform.position.x, transform.position.y + 2F, transform.position.z + 15F), transform.rotation); if (Controller.doubleJump) { Controller.cJ = Controller.cJ - Controller.doubleJumpTime; } else { Controller.doubleJump = true; bt(); } AudiosManager.instance.PlayingSound("Power"); Destroy(items.gameObject); } else if (items.gameObject.tag == "Star") { Instantiate(prefdoubleDie, new Vector3(transform.position.x, transform.position.y + 2F, transform.position.z + 15F), transform.rotation); if (doubleCoin) { cointimer = cointimer - Controller.doubleCoinTime; } else { doubleCoin = true; dc(); } AudiosManager.instance.PlayingSound("Power"); Destroy(items.gameObject); } else if (items.gameObject.tag == "Book") { itemEffectMaterial.mainTexture = bookEffectIco; GameObject effect = Instantiate(itemEffectObject, new Vector3(transform.position.x, transform.position.y + 7.5F, transform.position.z - 7F), transform.rotation) as GameObject; effect.transform.SetParent(this.transform); ProtectedPrefs.SetInt("mBook", ProtectedPrefs.GetInt("mBook") + 1); AudiosManager.instance.PlayingSound("Power"); Destroy(items.gameObject); } else if (items.gameObject.tag == "Pipe") { itemEffectMaterial.mainTexture = pipeEffectIco; GameObject effect = Instantiate(itemEffectObject, new Vector3(transform.position.x, transform.position.y + 7.5F, transform.position.z - 7F), transform.rotation) as GameObject; effect.transform.SetParent(this.transform); ProtectedPrefs.SetInt("mPipe", ProtectedPrefs.GetInt("mPipe") + 1); AudiosManager.instance.PlayingSound("Power"); Destroy(items.gameObject); } else if (items.gameObject.tag == "Emerald") { itemEffectMaterial.mainTexture = emeraldEffectIco; GameObject effect = Instantiate(itemEffectObject, new Vector3(transform.position.x, transform.position.y + 7.5F, transform.position.z - 7F), transform.rotation) as GameObject; effect.transform.SetParent(this.transform); ProtectedPrefs.SetInt("mEmerald", ProtectedPrefs.GetInt("mEmerald") + 1); AudiosManager.instance.PlayingSound("Power"); Destroy(items.gameObject); } else if (items.gameObject.tag == "Gold") { itemEffectMaterial.mainTexture = goldEffectIco; GameObject effect = Instantiate(itemEffectObject, new Vector3(transform.position.x, transform.position.y + 7.5F, transform.position.z - 7F), transform.rotation) as GameObject; effect.transform.SetParent(this.transform); ProtectedPrefs.SetInt("mGold", ProtectedPrefs.GetInt("mGold") + 1); AudiosManager.instance.PlayingSound("Power"); Destroy(items.gameObject); } else if (items.gameObject.tag == "Kalyan") { itemEffectMaterial.mainTexture = kalyanEffectIco; GameObject effect = Instantiate(itemEffectObject, new Vector3(transform.position.x, transform.position.y + 7.5F, transform.position.z - 7F), transform.rotation) as GameObject; effect.transform.SetParent(this.transform); ProtectedPrefs.SetInt("mKalyan", ProtectedPrefs.GetInt("mKalyan") + 1); AudiosManager.instance.PlayingSound("Power"); Destroy(items.gameObject); } else if (items.gameObject.tag == "Lamp") { itemEffectMaterial.mainTexture = lampEffectIco; GameObject effect = Instantiate(itemEffectObject, new Vector3(transform.position.x, transform.position.y + 7.5F, transform.position.z - 7F), transform.rotation) as GameObject; effect.transform.SetParent(this.transform); ProtectedPrefs.SetInt("mLamp", ProtectedPrefs.GetInt("mLamp") + 1); AudiosManager.instance.PlayingSound("Power"); Destroy(items.gameObject); getLamp = true; } else if (items.gameObject.tag == "Rubin") { itemEffectMaterial.mainTexture = rubinEffectIco; GameObject effect = Instantiate(itemEffectObject, new Vector3(transform.position.x, transform.position.y + 7.5F, transform.position.z - 7F), transform.rotation) as GameObject; effect.transform.SetParent(this.transform); ProtectedPrefs.SetInt("mRubin", ProtectedPrefs.GetInt("mRubin") + 1); AudiosManager.instance.PlayingSound("Power"); Destroy(items.gameObject); } else if (items.gameObject.tag == "Urna") { itemEffectMaterial.mainTexture = urnEffectIco; GameObject effect = Instantiate(itemEffectObject, new Vector3(transform.position.x, transform.position.y + 7.5F, transform.position.z - 7F), transform.rotation) as GameObject; effect.transform.SetParent(this.transform); ProtectedPrefs.SetInt("mUrna", ProtectedPrefs.GetInt("mUrna") + 1); AudiosManager.instance.PlayingSound("Power"); Destroy(items.gameObject); } else if (items.gameObject.tag == "Vaza") { itemEffectMaterial.mainTexture = vazeEffectIco; GameObject effect = Instantiate(itemEffectObject, new Vector3(transform.position.x, transform.position.y + 7.5F, transform.position.z - 7F), transform.rotation) as GameObject; effect.transform.SetParent(this.transform); ProtectedPrefs.SetInt("mVaza", ProtectedPrefs.GetInt("mVaza") + 1); AudiosManager.instance.PlayingSound("Power"); Destroy(items.gameObject); } }
void Save() { ProtectedPrefs.SetInt("DaysCount", DaysCount); ProtectedPrefs.SetString("LastGiftDateTime", LastGiftDateTime.ToLongDateString()); }
void Start() { bc = ProtectedPrefs.GetInt("mBook"); pc = ProtectedPrefs.GetInt("mPipe"); ec = ProtectedPrefs.GetInt("mEmerald"); gc = ProtectedPrefs.GetInt("mGold"); kc = ProtectedPrefs.GetInt("mKalyan"); rc = ProtectedPrefs.GetInt("mRubin"); uc = ProtectedPrefs.GetInt("mUrna"); vc = ProtectedPrefs.GetInt("mVaza"); if (bc >= 230) { book.text = "compleit"; if (ProtectedPrefs.GetInt("mb") == 0) { ProtectedPrefs.SetInt("mb", 1); ProtectedPrefs.SetInt("Coins", ProtectedPrefs.GetInt("Coins") + 10000); } } else { book.text = ProtectedPrefs.GetInt("mBook").ToString() + " / 230"; } if (pc >= 300) { pipe.text = "compleit"; if (ProtectedPrefs.GetInt("mp") == 0) { ProtectedPrefs.SetInt("mp", 1); ProtectedPrefs.SetInt("Coins", ProtectedPrefs.GetInt("Coins") + 15000); } } else { pipe.text = ProtectedPrefs.GetInt("mPipe").ToString() + " / 300"; } if (ec >= 350) { emerald.text = "compleit"; if (ProtectedPrefs.GetInt("me") == 0) { ProtectedPrefs.SetInt("me", 1); ProtectedPrefs.SetInt("Coins", ProtectedPrefs.GetInt("Coins") + 25000); } } else { emerald.text = ProtectedPrefs.GetInt("mEmerald").ToString() + " / 350"; } if (gc >= 500) { gold.text = "compleit"; if (ProtectedPrefs.GetInt("mg") == 0) { ProtectedPrefs.SetInt("mg", 1); ProtectedPrefs.SetInt("Coins", ProtectedPrefs.GetInt("Coins") + 50000); } } else { gold.text = ProtectedPrefs.GetInt("mGold").ToString() + " / 500"; } if (kc >= 550) { kalyan.text = "compleit"; if (ProtectedPrefs.GetInt("mk") == 0) { ProtectedPrefs.SetInt("mk", 1); ProtectedPrefs.SetInt("Coins", ProtectedPrefs.GetInt("Coins") + 70000); } } else { kalyan.text = ProtectedPrefs.GetInt("mKalyan").ToString() + " / 550"; } if (rc >= 650) { rubine.text = "compleit"; if (ProtectedPrefs.GetInt("mr") == 0) { ProtectedPrefs.SetInt("mr", 1); ProtectedPrefs.SetInt("Coins", ProtectedPrefs.GetInt("Coins") + 100000); } } else { rubine.text = ProtectedPrefs.GetInt("mRubin").ToString() + " / 650"; } if (uc >= 750) { urna.text = "compleit"; if (ProtectedPrefs.GetInt("mu") == 0) { ProtectedPrefs.SetInt("mu", 1); ProtectedPrefs.SetInt("Coins", ProtectedPrefs.GetInt("Coins") + 180000); } } else { urna.text = ProtectedPrefs.GetInt("mUrna").ToString() + " / 750"; } if (vc >= 800) { vaze.text = "compleit"; if (ProtectedPrefs.GetInt("mv") == 0) { ProtectedPrefs.SetInt("mv", 1); ProtectedPrefs.SetInt("Coins", ProtectedPrefs.GetInt("Coins") + 250000); } } else { vaze.text = ProtectedPrefs.GetInt("mVaza").ToString() + " / 800"; } if (ProtectedPrefs.GetInt("Coins") >= 500000) { coincollect.text = "compleit"; if (ProtectedPrefs.GetInt("cc") == 0) { ProtectedPrefs.SetInt("cc", 1); ProtectedPrefs.SetInt("Coins", ProtectedPrefs.GetInt("Coins") + 350000); } } else { coincollect.text = "none"; } }