Beispiel #1
0
    public void CalculateCoins()
    {
        int currentSavedCoins = PlayerPrefs.GetInt("Coins");

        Debug.Log("CalculatingCoins(): Userscore: " + completionScript.getUserScore());
        coins = completionScript.getUserScore() * 2;
        PlayerPrefs.SetInt("Coins", currentSavedCoins + coins);
        Debug.Log("Coins received " + coins);
        Debug.Log("Total Coins " + PlayerPrefs.GetInt("Coins"));
    }
Beispiel #2
0
    public void CalculateFinalScore()
    {
        CompletionScript completionScript = GameObject.Find("CompletionUI").GetComponent <CompletionScript>();
        SongObjectScript songObjectScript = (SongObjectScript)FindObjectOfType(typeof(SongObjectScript));

        currentHighScore = completionScript.getHighScore();
        userScore        = completionScript.getUserScore();
        songName         = songObjectScript.GetSongName();
    }