Пример #1
0
 // Use this for initialization
 void Awake()
 {
     colorBinding  = new Binding <Color> (myColor, nameOfBinding);
     colorProperty = new Property <Color> (myColor);
     colorBinding.AddProperty(colorProperty, BindingDirection.BiDirectional);
     colorProperty.AddListener(UpdateColor);
     if (sliderR != null)
     {
         sliderRProperty = new SliderProperty(sliderR);
         sliderRProperty.AddListener(UpdateR);
         UpdateR(sliderR.value);
     }
     if (sliderG != null)
     {
         sliderGProperty = new SliderProperty(sliderG);
         sliderGProperty.AddListener(UpdateG);
         UpdateG(sliderG.value);
     }
     if (sliderB != null)
     {
         sliderBProperty = new SliderProperty(sliderB);
         sliderBProperty.AddListener(UpdateB);
         UpdateB(sliderB.value);
     }
     if (sliderA != null)
     {
         sliderAProperty = new SliderProperty(sliderA);
         sliderAProperty.AddListener(UpdateA);
         UpdateA(sliderA.value);
     }
 }