protected virtual void Awake()
        {
            var vent = LocatorProvider.Get().Get(MaruKeys.Vent) as IMessageBus;

            off = new List <Action>(2);
            var key = GetInstanceID().ToString();

            off.Add(vent.On <SelectColorPickerPresetEvent>(key, PresetSelect));
            off.Add(vent.On <RemoveColorPickerPresetEvent>(key, RemovePreset));
            presetButtons = new Dictionary <int, GameObject>();

            picker.onHSVChanged.AddListener(HSVChanged);
            picker.onValueChanged.AddListener(ColorChanged);
            presetPrefab.SetActive(false);

            for (var i = 0; i < predefinedPresets.Length; i++)
            {
                presets.Add(new Tuple <int, Color>(i, predefinedPresets[i]));
            }

            LoadPresets(saveMode);
        }
 private void Awake()
 {
     manager = new AdjustableUIManager(canvas);
     manager.Listen(LocatorProvider.Get().Get(MaruKeys.Vent) as IMessageBus);
 }
Beispiel #3
0
 public void Awake()
 {
     defaultScale = transform.localScale;
     vent         = LocatorProvider.Get().Get(MaruKeys.Vent) as IMessageBus;
 }
Beispiel #4
0
 private void Awake()
 {
     colorPicker = GetComponent <ColorPickerControl>();
     vent        = LocatorProvider.Get().Get(MaruKeys.Vent) as IMessageBus;
     colorPicker.onValueChanged.AddListener(ColorPickerChanged);
 }
Beispiel #5
0
 public void Awake()
 {
     defaultPosition = transform.position;
     vent            = LocatorProvider.Get().Get(MaruKeys.Vent) as IMessageBus;
 }