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); }
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); }
public void Detach() { _property = null; }
public void Attach(IProperty property) { _property = property as IColorProperty; }