public void Takeoff(Plane plane, TakeoffRunwayStation runway) { simulatorService.AttachPlaneToStation(plane, runway); AddTakeoffToDb(plane, runway); TakeoffTime(); InvokeNotifierAction(plane); AddHistoryToDB(plane); Clear(plane, runway); RemovePlaneFromWaitersList(plane, runway); simulatorService.InvokeStationCleared(runway); simulatorService.InvokeTakeoffCompleted(runway); }
private void ContinueMovement(Plane plane, IStation currentStation) { IStation nextStation = simulatorService.GetAvailabelNextStation(currentStation); if (nextStation != null) { ExitedStationOperations(plane); simulatorService.SetPlaneEnteredTime(plane, nextStation); //update new station enterance time MoveToNextStation(nextStation, plane); //move plane ClearStationPlane(currentStation); //clear station simulatorService.InvokeStationCleared(currentStation); //notify listeners station cleared OnStationArrival(nextStation, plane); //Operations after plane move to new station. } else { simulatorService.KeepPlaneWait(plane, currentStation.NextStations, OnNextStationCleared); // if (currentStation is TakeoffRunwayStation) simulatorService.InvokeTakeoffWaiter(plane); } }