private void OnTriggerExit2D(Collider2D collision) { if (collision.tag == "Player") { messageBoard.CloseMessage(); } }
private void OnTriggerEnter2D(Collider2D collision) { if (collision.tag == "Player") { player.GetComponentInParent <PlayerController>().ActivateWeapon(); message.CloseMessage(); Destroy(gameObject); } }