Exemple #1
0
 private void OnTriggerEnter2D(Collider2D collider)
 {
     if (!bInvincible)
     {
         GameObject asteroid = collider.gameObject;
         if (asteroid.tag == "Asteroid")
         {
             Destroy(asteroid.gameObject);
             Destroy(gameObject);
             if (sceneCon == null)
             {
                 return;
             }
             sceneCon.LifeLoss();
         }
     }
 }