Beispiel #1
0
    public void Death()
    {
        if (dead)
        {
            return;
        }
        AudioManager.instance.Play(2);

        Destroy(currentLine);
        playerRb.constraints = RigidbodyConstraints2D.FreezePositionX;
        playerRb.AddForce(Vector3.up * 1000f);
        //player.GetComponent<Animator>().SetTrigger("Death");
        dead = true;
        canvas.SetTrigger("Fade");

        //scoreUI.SetText(Social.localUser.authenticated + Social.localUser.userName);
        //achievements
        if (score >= 100)
        {
            GPlayGames.UnlockAchievement(GPGSIds.achievement_100_points);
            //GPlayGames.ShowAchievementsUI();
        }
        //leaderboards
        GPlayGames.AddScoreToLeaderboard(GPGSIds.leaderboard_highscore, score);
        //GPlayGames.ShowLeaderboardsUI(GPGSIds.leaderboard_highscore);
    }
Beispiel #2
0
 public void UnlockFullScore()
 {
     GPlayGames.UnlockAchievement(GPGSIds.achievement_full_score);
 }
Beispiel #3
0
 public void UnlockGameOver()
 {
     GPlayGames.UnlockAchievement(GPGSIds.achievement_game_over);
 }