public void OnTriggerEnter2D(Collider2D collision) { try { if (collision.gameObject.CompareTag("Finish")) { Goomba goomba = gameObject.GetComponent <Goomba>(); goomba.SendMessage("NotifyAll"); StartCoroutine(lose()); } } catch { } }