public void Destruct() // Уничтожение UFO { AsteroidSounds.Instance.PlaySound("Boom"); ExplosionController.MakeExplosion(transform.position); _reward.GiveReward(); UFOPool.Instance.SendToPool(this); }
// 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); } }
public void Destruct() // Уничтожение корабля { AsteroidSounds.Instance.PlaySound("Boom"); ExplosionController.MakeExplosion(transform.position); GameController.Instance.HandleDeath(); }