예제 #1
0
파일: UFO.cs 프로젝트: EvilDroner/Asteroids
 public void Destruct() // Уничтожение UFO
 {
     AsteroidSounds.Instance.PlaySound("Boom");
     ExplosionController.MakeExplosion(transform.position);
     _reward.GiveReward();
     UFOPool.Instance.SendToPool(this);
 }
예제 #2
0
 // Update is called once per frame
 void Update()
 {
     if (Input.GetKeyDown(KeyCode.B))
     {
         Vector3 newPos = new Vector3(Random.Range(-20, 20), Random.Range(0, 15), 0);
         explosionController.MakeExplosion(newPos, ExplosionSize.Small, limbs);
     }
 }
예제 #3
0
 public void Destruct() // Уничтожение корабля
 {
     AsteroidSounds.Instance.PlaySound("Boom");
     ExplosionController.MakeExplosion(transform.position);
     GameController.Instance.HandleDeath();
 }