public Context(TrafficLightsConfigViewPair trafficLightsConfigViewPair, Transform mainCanvas, TrafficLightsDisplayView trafficLightsDisplayViewPrefab,
                Action backButtonClickedAction)
 {
     TrafficLightsConfigViewPair    = trafficLightsConfigViewPair;
     TrafficLightsDisplayViewPrefab = trafficLightsDisplayViewPrefab;
     MainCanvas = mainCanvas;
     BackButtonClickedAction = backButtonClickedAction;
 }
Esempio n. 2
0
        private TrafficLightOptionView CreateOption(TrafficLightsConfigViewPair trafficLightConfigViewPair, Action <string> onOptionSelectedAction)
        {
            TrafficLightOptionView newOption = Instantiate(trafficLightOptionPrefab, optionsRootTransform);

            newOption.SetOption(trafficLightConfigViewPair.Config.Caption, onOptionSelectedAction);

            return(newOption);
        }
Esempio n. 3
0
        private void OnTrafficLightsOptionSelectedEventHandler(string option)
        {
            _trafficLightsSelectorController.Close();

            TrafficLightsConfigViewPair selectedPair = GetConfigViewPairByOption(option);

            TrafficLightsDisplayController.Context trafficLightsDisplayControllerContext =
                new TrafficLightsDisplayController.Context(selectedPair, mainCanvas, displayViewPrefab, OnTrafficLightsDisplayClosedEventHandler);
            _trafficLightsDisplayController = new TrafficLightsDisplayController(trafficLightsDisplayControllerContext);
        }
Esempio n. 4
0
 public Context(TrafficLightsConfigViewPair trafficLightsConfigViewPair, Transform mainCanvas)
 {
     TrafficLightsConfigViewPair = trafficLightsConfigViewPair;
     MainCanvas = mainCanvas;
 }