Exemple #1
0
 private void CheckHealth()
 {
     if (Health <= 0)
     {
         GameObject explosionGO = Instantiate(explosion, transform.position, Quaternion.identity);
         explosionGO.transform.position = new Vector2(transform.position.x, transform.position.y + 0.5f);
         uiManager.AddScore(PersistentManager.getAsteroidScore(asteroidId));
         Destroy(explosionGO, 1.1f);
         Destroy(gameObject);
     }
 }