Beispiel #1
0
    // Gain points.
    public void GainPoints(int points)
    {
        score += points;

        AchievementsUtility.CalculatePointsAchievement(score);

        uiManager.UpdateScore(score);
    }
Beispiel #2
0
    void Start()
    {
        PlayGamesClientConfiguration config = new PlayGamesClientConfiguration.Builder()
                                              .EnableSavedGames()
                                              .Build();

        PlayGamesPlatform.InitializeInstance(config);

        PlayGamesPlatform.DebugLogEnabled = false;
        PlayGamesPlatform.Activate();

        Social.localUser.Authenticate((bool success) =>
        {
            if (success)
            {
                AchievementsUtility.StartGameAchievement();
            }
        });
    }
Beispiel #3
0
    public void AsteroidDestroyed()
    {
        asteroidsDestroyed++;

        AchievementsUtility.CalculateAsteroidsAchievement(asteroidsDestroyed);
    }