private void OnCollisionEnter2D(Collision2D collision) { if (collision.gameObject.tag == "enemy") { AudioSource audio = GetComponent <AudioSource>(); // audio.PlayOneShot(explode); audio.Play(); rend.enabled = false; Destroy(gameObject, audio.clip.length); var Exp = Instantiate(explosion, gameObject.transform.position, Quaternion.identity); ui.ActivateGameOver(); } }