void OnTriggerExit2D(Collider2D coll) { EnemyRegister other_enemy = coll.gameObject.GetComponent <EnemyRegister> (); if (other_enemy && mov) { mov.enemies.Remove(other_enemy.r); } }