private void OnTriggerStay2D(Collider2D collision) { if (!is_taming) { if (collision.gameObject.layer == LayerMask.NameToLayer("Enemy")) { EnemyHandler character = collision.gameObject.GetComponentInParent <EnemyHandler>(); if (!character.is_tamed) { character.AttemptTame(this); } } } }