Esempio n. 1
0
    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();
    }
Esempio n. 2
0
    private void Start()
    {
        slicer = GameObject.FindGameObjectWithTag("CubeSlicer").GetComponent <CubeSlicer>();
        UpdateControllerReference();

        scoreHandling = GameObject.FindGameObjectWithTag("ScoreHandling").GetComponent <ScoreHandling>();
        audioHandling = GameObject.FindGameObjectWithTag("AudioHandling").GetComponent <AudioHandling>();
    }
Esempio n. 3
0
 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);
 }
Esempio n. 4
0
    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>();
    }
Esempio n. 5
0
 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>();
 }
Esempio n. 7
0
 private void Awake()
 {
     Songsettings  = GameObject.FindGameObjectWithTag("SongSettings").GetComponent <SongSettings>();
     SceneHandling = GameObject.FindGameObjectWithTag("SceneHandling").GetComponent <SceneHandling>();
     ScoreHandling = GameObject.FindGameObjectWithTag("ScoreHandling").GetComponent <ScoreHandling>();
 }