public virtual void OnTriggerEnter2D(Collider2D other) { if (other.gameObject.tag == "Player") { other.GetComponent <Character>().TakeDamage(50); } if (other.gameObject.tag == "Edge") { AtlasScript.ChangeDirection(); } }