private void ClearAllSchedule() { ReservationManager reservationManager = GameObject.Find("MapUtil").GetComponent <ReservationManager>(); reservationManager.ClearAll(); foreach (ShipController ship in priorityQueue.queue) { ship.schedule = null; ship.status = ShipStatus.Scheduling; } foreach (ShipController ship in waitList.queue) { ship.schedule = null; ship.status = ShipStatus.RedSignal; } }