Example #1
0
        public static void BuildProperty(IColorProperty property, TypeBuilder type, PropertyBuilder propertyBuilder, Dictionary <IBusinessObjectBase, TypeBuilder> definedTypes)
        {
            var p    = propertyBuilder; //PropertyLogic.BuildPropertyCore(property, type, definedTypes);
            var ctor = typeof(ValueConverterAttribute).GetConstructor(new[] { typeof(Type) });
            var cb   = new CustomAttributeBuilder(ctor, new object[] { typeof(NullableColorToIntConverter) });

            p.SetCustomAttribute(cb);
        }
Example #2
0
        static public Tweener <Color, ColorHelper> To(IColorProperty property, Color to, float duration, bool scalable = true)
        {
            Tweener <Color, ColorHelper> tweener = _colorTweeners.Get();

            tweener.IncRef();

            var aniMgr = TimerMgr._Instance;

            tweener.SetParams(property, scalable ? aniMgr._Time : aniMgr._RealTime
                              , duration, property.GetValue(), to - property.GetValue(), scalable);
            tweener.Start();

            return(tweener);
        }
Example #3
0
 public void Detach()
 {
     _property = null;
 }
Example #4
0
 public void Attach(IProperty property)
 {
     _property = property as IColorProperty;
 }