public static Tweener PlayCurve(object targ, TweenCurve curve) { var tween = new ObjectTweener(targ, curve); tween.Play(); return(tween); }
public ObjectTweener(object targ, TweenCurve curve) { if (targ == null) throw new System.ArgumentNullException("targ"); if (curve == null) throw new System.ArgumentNullException("curve"); if (curve.Tween != null) throw new System.ArgumentException("Tweener can only be created with an unregistered Curve.", "curve"); _target = targ; _curve = curve; _curve.Init(this); }
public new static MemberCurve CreateBy(object target, string propName, Ease ease, object amt, float dur, object option = null) { if (target == null) { throw new System.ArgumentNullException("target"); } System.Type memberType; var accessor = MemberCurve.GetAccessor(target, propName, out memberType); object start = accessor.Get(target); object end = TweenCurve.TrySum(memberType, start, amt); return(MemberCurve.Create(memberType, accessor, ease, dur, start, end, option)); }
public ObjectTweener(object targ, TweenCurve curve) { if (targ == null) { throw new System.ArgumentNullException("targ"); } if (curve == null) { throw new System.ArgumentNullException("curve"); } if (curve.Tween != null) { throw new System.ArgumentException("Tweener can only be created with an unregistered Curve.", "curve"); } _target = targ; _curve = curve; _curve.Init(this); }
//######################### // CURVES // public TweenHash UseCurve(TweenCurve curve) { _props.Add(new PropInfo(AnimMode.Curve, null, null, float.NaN, curve, null)); return(this); }
//######################### // CURVES // public TweenHash UseCurve(TweenCurve curve) { _props.Add(new PropInfo(AnimMode.Curve, null, null, curve, float.NaN, null)); return this; }
public static Tweener PlayCurve(object targ, TweenCurve curve) { var tween = new ObjectTweener(targ, curve); tween.Play(); return tween; }