Exemple #1
0
 void OnCollisionStay2D(Collision2D CollidedWith)
 {
     if (CollidedWith.gameObject.tag == "Ship")
     {
         Spawner.Spawn_Small(Health, gameObject.transform.position);
         Spawner.Explotion(CollidedWith.gameObject, gameObject, 0);
     }
     else if (CollidedWith.gameObject.tag == "Bullet")
     {
         Spawner.Spawn_Small(Health, gameObject.transform.position);
         Spawner.Explotion(gameObject, CollidedWith.gameObject, 1);
         hud.AddPoint();
     }
 }