public Animation(object obj, string propName, float startValue, float endValue, EaseFunctionDelegate easeFunc, EasingType easeType) { if(propName != null) { _property = obj.GetType().GetProperty(propName); } else { _property = null; } PropertyName = propName; _obj = obj; _startValue = startValue; _endValue = endValue; _easeFunc = easeFunc; _easeType = easeType; }
public Animation(object obj, string propName, float endValue, EaseFunctionDelegate easeFunc, EasingType easeType) : this(obj, propName, 0.0f, endValue, easeFunc, easeType) { _startValue = Convert.ToSingle(_property.GetValue(obj, null)); }