// Use this for initialization void Start() { highScoreCalculator = GameObject.Find("High Score Calculator").GetComponent <High_Score_Calculator> (); //first check if they're using the most recent version of the game if (PlayerPrefs.GetInt("Version", 0) != versionNumber) { highScoreCalculator.Reset_All_Scores(); foreach (High_Score_Displayer hsd in hsds) { hsd.update_scores(); } PlayerPrefs.SetInt("Version", versionNumber); } achievementHandler = GameObject.Find("Achievement Handler").GetComponent <Achievement_Script> (); gpgNotification = GameObject.Find("Google Play Notification").GetComponent <GPG_Notification> (); Goto_Game_Mode_Layer(); shutter.Begin_Vertical_Open(); GameObject MCobject = GameObject.FindGameObjectWithTag("Music Controller"); mc = MCobject.GetComponent <Music_Controller> (); mc.Play_Music("Menu"); //just in case this is the first time playing, set Wiz to be for sure unlocked PlayerPrefs.SetInt("Wiz unlocked", 1); //tell achievmement handler to check gamemodes that are supposed to be active achievementHandler.Check_Gamemode_Unlocked(); activeMode = 0; prevMode = 0; ScrollDown.BroadcastMessage("FadeOut", null, SendMessageOptions.DontRequireReceiver); for (int i = 0; i < 4; i++) { OrigButtonSprite[i] = GameButtons[i].GetComponent <Image>().sprite; OrigDescText[i] = Descriptions[i].GetComponent <Text>().text; } GameMode_Unlocker(); if (PlayerPrefs.GetInt("Played Before", 0) == 1) { Destroy(HTPEmphasizer); } }
public void Reset_High_Scores() { if (resetPresses == 0) { Text rhst = GameObject.Find("Reset High Scores Text").GetComponent <Text>(); resetPresses++; rhst.text = "Are you sure?"; } else { highScoreCalculator.Reset_All_Scores(); Text rhst = GameObject.Find("Reset High Scores Text").GetComponent <Text>(); foreach (High_Score_Displayer hsd in hsds) { hsd.update_scores(); } rhst.text = "High Scores Reset!"; } }