public static SpartaTransition Create(TimeSpan transitionTime, SpartaTransitionType transitionType, EasingCurve.EasingCurveType transitionEasing) { return(new SpartaTransition() { transitionTime = transitionTime, transitionType = transitionType, transitionEasing = transitionEasing }); }
public SpartaPropertyAnimation(object instance, string propertyName, object from, object to, TimeSpan time, EasingCurve.EasingCurveType easingCurve, FinishedDelegate callback) { this.instance = instance; this.propertyName = propertyName; this.propertyInstance = instance.GetType().GetProperty(propertyName); this.property = propertyInstance.GetValue(instance, null); this.From = from; this.To = to; this.Duration = time; this.easingCurve = new EasingCurve(easingCurve); Finished = callback; State = SpartaAnimationState.Stopped; }