public void changeBG(int index) { // if index above 1 then alert if not premimun if (PlayerPrefs.GetInt("highscore") != 763 && index > 1) { AlertScript.activateAlert(7); } else { PlayerPrefs.SetInt("bgSelect", index); ChangeScene.changeBackgroundTint(CustomizeStorage.backgroundColors[index]); } }
public void skinClickedHandler(int idNumber) { if (idNumber == 48 && !allOwned()) // is qMark and not all owned { AlertScript.activateAlert(6); } else if (idNumber < 48 && owned[idNumber].Equals('0')) // is other than qMark and not owned { if (!ChangeScene.isChanging) { buyingId = idNumber; int cost = 300; if (idNumber < 24) { cost = 50; } // common cost else if (idNumber < 40) { cost = 100; } // rare cost AlertScript.activateAlertToBuyItem(cost); } } else // owned { if (PlayerPrefs.GetString("sound").Equals("on")) { selectSound.Play(); } // set and save CustomizeStorage.selectedArrow = idNumber; PlayerPrefs.SetInt("arrowSelect", idNumber); // set image Image img = ImageSelect.GetComponent <Image>(); img.sprite = CustomizeStorage.arrowImage[idNumber]; img.color = CustomizeStorage.arrowColors[idNumber]; } }