Beispiel #1
0
        public TrafficLightsSelectorController(Context context)
        {
            _context = context;

            _view = Object.Instantiate(_context.TrafficLightsSelectorViewPrefab, _context.MainCanvas);
            _view.Init(_context.AvailableTrafficLights, _context.OptionSelectedAction);
        }
Beispiel #2
0
 public Context(TrafficLightsPoolConfig availableTrafficLights, Transform mainCanvas, TrafficLightsSelectorView trafficLightsSelectorViewPrefab,
                Action <string> optionSelectedAction)
 {
     AvailableTrafficLights          = availableTrafficLights;
     MainCanvas                      = mainCanvas;
     TrafficLightsSelectorViewPrefab = trafficLightsSelectorViewPrefab;
     OptionSelectedAction            = optionSelectedAction;
 }