Exemplo n.º 1
0
 void OnTriggerEnter2D(Collider2D other)
 {
     if (other.gameObject.tag != gameObject.tag)
     {
         Destroy(other.gameObject);
         gmManager.UpdateScore(scoreToAdd);
     }
     else
     {
         Destroy(other.gameObject);
         gmManager.UpdateLives(damageToApplicate);
     }
 }
Exemplo n.º 2
0
 void Awake()
 {
     GetComponents();
     playerLives = PlayerPrefs.GetInt("PlayerLives", 2);
     gm.UpdateLives(playerLives);
 }