private void OnTriggerEnter2D(Collider2D collision) { foreach (var tag in tagsColisao) { if (collision.gameObject.CompareTag(tag)) { Vida vida = collision.GetComponent <Vida>(); if (vida != null) { vida.CausarDano(quantidadeDano); } Despawn(); } } }