예제 #1
0
 // Update is called once per frame
 void Update()
 {
     if (countBodyParts == countDeadEnemies)
     {
         TriggerWinPanel();
         GooglePlayGamesServices.UnlockAchievement(SlingshotSoldier.GPGSIds.achievement_full_body);
     }
 }
예제 #2
0
 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);
 }