Beispiel #1
0
    //public void addLife(int value){

    //    lifebar.value += (value / 100.0f);
    //    rewardVideoPanel.SetActive(false);
    //    //Time.timeScale = 1;

    //}

    public void onCancel()
    {
        rewardVideoPanel.SetActive(false);
        if (Scoring.score > GameController.getHighScore())
        {
            GameController.setHighScore(Scoring.score);
            GooglePlayScript.AddScoreToLeaderboard(GPGSIds.leaderboard_rocket_lead, Scoring.score);
        }
        score.SetActive(true);
        currentScore.text = Scoring.score.ToString();
        highScore.text    = GameController.getHighScore().ToString();
        Time.timeScale    = 0;
    }
    // Use this for initialization
    void Start()
    {
        int Counter;
        int score        = PlayerPrefs.GetInt("currentScore");
        int highScoreOld = PlayerPrefs.GetInt("highestScoreOld");

        if (score > highScoreOld)
        {
            Counter = score;
        }
        else
        {
            Counter = highScoreOld;
        }
        GooglePlayScript.AddScoreToLeaderboard(GPGSIds.leaderboard_leaderboard, Counter); * /
    }