//---------------------------------------------------------------------- // IAltoTween implementation //---------------------------------------------------------------------- public IAltoTween FromTo( float from, float to, float duration, AltoEasingFunc easingFunc = null ) { _from = from; _to = to; _duration = duration; _easingFunc = (easingFunc != null) ? easingFunc : AltoEase.Linear; return(this); }
/// <summary> /// トゥイーンを登録する。obj は途中で止めたくなった時の対象指定用なので /// その用途が無ければ null を渡してもよい /// </summary> public void Go( object obj, float from, float to, float duration, AltoEasingFunc easingFunc, AltoTweenCallback onUpdate ) { var tween = new AltoTween(from, to, duration, easingFunc, onUpdate); tween.Init(); AddTween(obj, tween); }
public AltoTween( float from = 0f, float to = 0f, float duration = 0f, AltoEasingFunc easingFunc = null, AltoTweenCallback onUpdate = null, AltoTweenCallback onComplete = null ) { _from = from; _to = to; _duration = duration; _easingFunc = easingFunc; _onUpdate = onUpdate; _onComplete = onComplete; }