private void RequestFloor(int floor) { var direction = floor > _currentFloor ? DirectionType.Up : DirectionType.Down; var currentRequest = new LiftCallCommand(floor, direction); CheckActiveRequests(); Request(currentRequest, direction); }
private void Request(LiftCallCommand liftCallCommand, DirectionType directionType) { _liftCallCommands.Add(liftCallCommand); if (_currentDirectionType == DirectionType.None) { _currentDirectionType = directionType; MoveLift(); } }
private void CallTheLift(DirectionType directionRequest, Image buttonImage) { if (_directionRequest == DirectionType.None && _liftCurrentFloor != _floorNumber) { _directionRequest = directionRequest; buttonImage.color = _higlighedColor; var liftCallCommand = new LiftCallCommand(_floorNumber, _directionRequest); if (LiftCalled != null) { LiftCalled(liftCallCommand); } } }
private void RequestFloor(LiftCallCommand liftCallCommand) { _liftController.RequestFloor(liftCallCommand); }
public void RequestFloor(LiftCallCommand liftCallCommand) { var direction = liftCallCommand.Floor > _currentFloor ? DirectionType.Up : DirectionType.Down; Request(liftCallCommand, direction); }