Beispiel #1
0
 private void updateSetting(ColorSetting newSetting)
 {
     setting?.onColorChanged.RemoveListener(onColorChanged);
     setting = newSetting;
     onColorChanged(setting);
     setting.onColorChanged.AddListener(onColorChanged);
 }
 protected virtual void Awake()
 {
     if (!string.IsNullOrEmpty(Color))
     {
         setting = Colors.GetColor(Color);
         if (setting != null)
         {
             onColorChanged(setting);
             setting.onColorChanged.AddListener(onColorChanged);
         }
     }
 }
Beispiel #3
0
 public void SetColor(ColorSetting newSetting)
 {
     newSetting ??= Colors.Neutral;
     Color = newSetting.html;
     updateSetting(newSetting);
 }