private void Awake() { SongSettings = GameObject.FindGameObjectWithTag("SongSettings").GetComponent <SongSettings>(); ScoreHandling = GameObject.FindGameObjectWithTag("ScoreHandling").GetComponent <ScoreHandling>(); highScoreLocal.AddHighScoreToSong(SongSettings.CurrentSong.Hash, PlayerPrefs.GetString("Username"), SongSettings.CurrentSong.SelectedDifficulty, ScoreHandling.ActualScore); if (PlayerPrefs.GetInt("UseGlobalHighscore") == 1) { HighScoreTitle.text = "GLOBAL HIGHSCORES"; highScore.AddHighScoreToSong(SongSettings.CurrentSong.Hash, PlayerPrefs.GetString("Username"), SongSettings.CurrentSong.Name, SongSettings.CurrentSong.SelectedDifficulty, ScoreHandling.ActualScore); var highscoreList = highScore.GetFirstTenHighScoreOfSong(SongSettings.CurrentSong.Hash, SongSettings.CurrentSong.SelectedDifficulty); string formatString = Highscore[0].text; for (int i = 0; i < highscoreList.Count; i++) { Highscore[i].text = string.Format(formatString, highscoreList[i].Username, highscoreList[i].Score); } } else { HighScoreTitle.text = "LOCAL HIGHSCORES"; var highscoreListLocal = highScoreLocal.GetFirstTenHighScoreOfSong(SongSettings.CurrentSong.Hash, SongSettings.CurrentSong.SelectedDifficulty); string formatStringLocal = Highscore[0].text; for (int i = 0; i < highscoreListLocal.Count; i++) { Highscore[i].text = string.Format(formatStringLocal, highscoreListLocal[i].Username, highscoreListLocal[i].Score); } } CurrentScore.text = ScoreHandling.ActualScore.ToString(); }
private void Start() { slicer = GameObject.FindGameObjectWithTag("CubeSlicer").GetComponent <CubeSlicer>(); UpdateControllerReference(); scoreHandling = GameObject.FindGameObjectWithTag("ScoreHandling").GetComponent <ScoreHandling>(); audioHandling = GameObject.FindGameObjectWithTag("AudioHandling").GetComponent <AudioHandling>(); }
private void Awake() { songSettings = GameObject.FindGameObjectWithTag("SongSettings").GetComponent <SongSettings>(); sceneHandling = GameObject.FindGameObjectWithTag("SceneHandling").GetComponent <SceneHandling>(); scoreHandling = GameObject.FindGameObjectWithTag("ScoreHandling").GetComponent <ScoreHandling>(); scoreSystem = GameObject.FindGameObjectWithTag("HighScore").GetComponent <HighScoreSystem>(); scoreBoard = GetComponentInChildren <HighScoreBoard>(true); }
private void Start() { slicer = GetComponentInChildren <Slice>(true); var controllerEvent = GetComponentInChildren <VRTK_ControllerEvents>(true); if (controllerEvent != null && controllerEvent.gameObject != null) { controllerReference = VRTK_ControllerReference.GetControllerReference(controllerEvent.gameObject); } scoreHandling = GameObject.FindGameObjectWithTag("ScoreHandling").GetComponent <ScoreHandling>(); }
private void Start() { scoreHandling = GameObject.FindGameObjectWithTag("ScoreHandling").GetComponent <ScoreHandling>(); }
void Start() { CollisionDetection = GetComponent <VRTK.VRTK_HeadsetCollision>(); CollisionDetection.HeadsetCollisionDetect += CollisionDetection_HeadsetCollisionDetect; ScoreHandling = GameObject.FindGameObjectWithTag("ScoreHandling").GetComponent <ScoreHandling>(); }
private void Awake() { Songsettings = GameObject.FindGameObjectWithTag("SongSettings").GetComponent <SongSettings>(); SceneHandling = GameObject.FindGameObjectWithTag("SceneHandling").GetComponent <SceneHandling>(); ScoreHandling = GameObject.FindGameObjectWithTag("ScoreHandling").GetComponent <ScoreHandling>(); }