Пример #1
0
        public void SwitchOn()
        {
            if (switchedOn)
            {
                return;
            }

            switchedOn = true;
            OnSwitchedOn?.Invoke();

            //TODO should not be here - use mediator OnSwitchedOn
            elevatorController.AddTargetFloor(config.floorIndex);

            canUse = false;
            OnCanSwitchChanged?.Invoke(canUse);
        }
Пример #2
0
 void HandleFloorButtonClicked(FloorData data)
 {
     controller.AddTargetFloor(data);
     view.Refresh(controller.Queue, controller.CurrentFloorIndex);
 }