// Update is called once per frame void Update() { if (countBodyParts == countDeadEnemies) { TriggerWinPanel(); GooglePlayGamesServices.UnlockAchievement(SlingshotSoldier.GPGSIds.achievement_full_body); } }
public void PostToLeaderboard() { if (Authenticated && score > mHighestPostedScore) { // post score to the leaderboard Social.ReportScore(score, GameIds.LeaderboardId, (bool success) => { }); GooglePlayGamesServices.IncrementAchievement(SlingshotSoldier.GPGSIds.achievement_high_score, 1); mHighestPostedScore = score; } else { Debug.LogWarning("Not reporting score, auth = " + Authenticated + " " + score + " <= " + mHighestPostedScore); } }
void Die() { transform.parent.gameObject.GetComponent <EnemyManager>().countDeadEnemies++; Instantiate(deathEffect, transform.position, Quaternion.identity); Handheld.Vibrate(); if (!firstSpark) { GooglePlayGamesServices.UnlockAchievement(SlingshotSoldier.GPGSIds.achievement_first_spark); firstSpark = true; } //EnemiesAlive--; if (!isAlive) { Debug.Log("Body Part Destroyed!"); } Destroy(gameObject); }
public void ShowLeaderboards() { Beep(); GooglePlayGamesServices.ShowLeaderboardsUI(); }
public void ShowAchievements() { Beep(); GooglePlayGamesServices.ShowAchievementsUI(); }