// Gain points. public void GainPoints(int points) { score += points; AchievementsUtility.CalculatePointsAchievement(score); uiManager.UpdateScore(score); }
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(); } }); }
public void AsteroidDestroyed() { asteroidsDestroyed++; AchievementsUtility.CalculateAsteroidsAchievement(asteroidsDestroyed); }