public static async Task PlayTo <T>(IAnimatorWithStartValue <T> animator, IValueTranslator <T> translator, IScheduler scheduler) { var awaitable = new AwaitableEnumerator(); animator.Start(translator.Current); StartCoroutine(PlayCoroutine(new DummyAnimator <T>(animator), translator, awaitable, scheduler)); await awaitable; }
public ConvertAnimatorWithStartValue(IAnimatorWithStartValue <T> animator, Func <T, T> func) { this.animator = animator; this.func = func; }
public static UniTask ToMaterialPropertyFloat(this IAnimatorWithStartValue <float> animator, Renderer renderer, int nameID, CancellationToken cancellationToken = default, IScheduler scheduler = default) => Anime.PlayTo(animator, new MaterialPropertyFloatTranslator(renderer, nameID), scheduler, cancellationToken);
public static DebugLogAnimatorWithStartValue <T> DebugLog <T>(this IAnimatorWithStartValue <T> animator) { return(new DebugLogAnimatorWithStartValue <T>(animator)); }
public DummyAnimator(IAnimatorWithStartValue <T> animator) { this.animator = animator; }
public static UniTask PlayTo <T>(IAnimatorWithStartValue <T> animator, IValueTranslator <T> translator, CancellationToken cancellationToken = default) { return(PlayTo(animator, translator, DefaultScheduler, cancellationToken)); }
public static UniTask ToGlobalRotation(this IAnimatorWithStartValue <Quaternion> animator, Component component, CancellationToken cancellationToken = default, SkipToken skipToken = default, IScheduler scheduler = default) => Anime.PlayTo(animator, new GlobalRotationTranslator(component.transform), scheduler, CancellationTokenSource.CreateLinkedTokenSource(component.GetCancellationTokenOnDestroy(), cancellationToken).Token, skipToken);
public static UniTask ToLocalScale(this IAnimatorWithStartValue <Vector2> animator, GameObject gameObject, CancellationToken cancellationToken = default, SkipToken skipToken = default, IScheduler scheduler = default) => Anime.PlayTo(animator, new LocalScaleTranslator(gameObject.transform), scheduler, CancellationTokenSource.CreateLinkedTokenSource(gameObject.GetCancellationTokenOnDestroy(), cancellationToken).Token, skipToken);
public static UniTask ToBind <T>(this IAnimatorWithStartValue <T> animator, Func <T> getter, Action <T> setter, CancellationToken cancellationToken = default, SkipToken skipToken = default, IScheduler scheduler = default) => Anime.PlayTo(animator, new BindTranslator <T>(getter, setter), scheduler, cancellationToken, skipToken);
public RelativeDelayAnimatorWithStartValue(IAnimatorWithStartValue <T2> baseAnimator, float duration) { this.baseAnimator = baseAnimator.Start(default);
public static RelativeDelayAnimatorWithStartValue <T1, T2> RelativeDelay <T1, T2>(this IAnimatorWithStartValue <T2> baseAnimator, float duration) => new RelativeDelayAnimatorWithStartValue <T1, T2>(baseAnimator, duration);
public static ConcatAnimatorWithStartValue <T> Delay <T>(this IAnimatorWithStartValue <T> animator, float duration) => Concat(animator, Delay <T>(duration));
public static UniTask ToAnchoredPositionX(this IAnimatorWithStartValue <float> animator, Graphic graphic, CancellationToken cancellationToken = default, SkipToken skipToken = default, IScheduler scheduler = default) { CheckAlive(graphic); return(Anime.PlayTo(animator, new AnchoredPositionXTranslator(graphic.rectTransform, 0), scheduler, CancellationTokenSource.CreateLinkedTokenSource(graphic.GetCancellationTokenOnDestroy(), cancellationToken).Token, skipToken)); }
public static UniTask ToAnchoredPosition(this IAnimatorWithStartValue <Vector2> animator, RectTransform rectTransform, CancellationToken cancellationToken = default, SkipToken skipToken = default, IScheduler scheduler = default) { CheckAlive(rectTransform); return(Anime.PlayTo(animator, new AnchoredPositionTranslator(rectTransform), scheduler, CancellationTokenSource.CreateLinkedTokenSource(rectTransform.GetCancellationTokenOnDestroy(), cancellationToken).Token, skipToken)); }
public static UniTask ToSizeDeltaY(this IAnimatorWithStartValue <float> animator, GameObject gameObject, CancellationToken cancellationToken = default, SkipToken skipToken = default, IScheduler scheduler = default) { CheckAlive(gameObject); return(Anime.PlayTo(animator, new SizeDeltaXTranslator(gameObject.GetComponent <RectTransform>(), 1), scheduler, CancellationTokenSource.CreateLinkedTokenSource(gameObject.GetCancellationTokenOnDestroy(), cancellationToken).Token, skipToken)); }
public static UniTask ToFillAmount(this IAnimatorWithStartValue <float> animator, Image image, CancellationToken cancellationToken = default, SkipToken skipToken = default, IScheduler scheduler = default) => Anime.PlayTo(animator, new FillAmountTranslator(image), scheduler, CancellationTokenSource.CreateLinkedTokenSource(image.GetCancellationTokenOnDestroy(), cancellationToken).Token, skipToken);
public static UniTask ToGlobalPositionZ(this IAnimatorWithStartValue <float> animator, GameObject gameObject, CancellationToken cancellationToken = default, SkipToken skipToken = default, IScheduler scheduler = default) => Anime.PlayTo(animator, new GlobalPositionXTranslator(gameObject.transform, 2), scheduler, CancellationTokenSource.CreateLinkedTokenSource(gameObject.GetCancellationTokenOnDestroy(), cancellationToken).Token, skipToken);
public static ConcatAnimatorWithStartValue <T> Concat <T>(this IAnimatorWithStartValue <T> animator1, params IConcatableAnimator <T>[] animator2) { return(new ConcatAnimatorWithStartValue <T>(animator1, animator2)); }
public static UniTask ToLocalScaleZ(this IAnimatorWithStartValue <float> animator, Component component, CancellationToken cancellationToken = default, SkipToken skipToken = default, IScheduler scheduler = default) => Anime.PlayTo(animator, new LocalScaleXTranslator(component.transform, 2), scheduler, CancellationTokenSource.CreateLinkedTokenSource(component.GetCancellationTokenOnDestroy(), cancellationToken).Token, skipToken);
public ConcatAnimatorWithStartValue(IAnimatorWithStartValue <T> animator1, IConcatableAnimator <T>[] animator2) { this.animator1 = animator1; this.animator2 = animator2; }
public static UniTask ToReactiveProperty <T>(this IAnimatorWithStartValue <T> animator, ReactiveProperty <T> reactiveProperty, CancellationToken cancellationToken = default, SkipToken skipToken = default, IScheduler scheduler = default) => Anime.PlayTo(animator, new ReactivePropertyTranslator <T>(reactiveProperty), scheduler, cancellationToken, skipToken);
public static UniTask ToNone <T>(this IAnimatorWithStartValue <T> animator, CancellationToken cancellationToken = default, SkipToken skipToken = default, IScheduler scheduler = default) { return(Anime.PlayTo(animator, new NoneTranslator <T>(), scheduler, cancellationToken, skipToken)); }
public static async UniTask PlayTo <T>(IAnimatorWithStartValue <T> animator, IValueTranslator <T> translator, IScheduler scheduler, CancellationToken cancellationToken = default) { animator.Start(translator.Current); await PlayInternal(new DummyAnimator <T>(animator), translator, scheduler, cancellationToken); }
public static UniTask ToMaterialPropertyInt(this IAnimatorWithStartValue <int> animator, Renderer renderer, string name, CancellationToken cancellationToken = default, SkipToken skipToken = default, IScheduler scheduler = default) => Anime.PlayTo(animator, new MaterialPropertyIntTranslator(renderer, name), scheduler, CancellationTokenSource.CreateLinkedTokenSource(renderer.GetCancellationTokenOnDestroy(), cancellationToken).Token, skipToken);
public static UniTask ToColorA(this IAnimatorWithStartValue <float> animator, Graphic graphic, CancellationToken cancellationToken = default, IScheduler scheduler = default) => Anime.PlayTo(animator, new ColorXTranslator(graphic, 3), scheduler, cancellationToken);
public static UniTask ToAnchoredPosition(this IAnimatorWithStartValue <Vector2> animator, Graphic graphic, CancellationToken cancellationToken = default, SkipToken skipToken = default, IScheduler scheduler = default) => Anime.PlayTo(animator, new AnchoredPositionTranslator(graphic.rectTransform), scheduler, CancellationTokenSource.CreateLinkedTokenSource(graphic.GetCancellationTokenOnDestroy(), cancellationToken).Token, skipToken);
public DebugLogAnimatorWithStartValue(IAnimatorWithStartValue <T> animator) { this.animator = animator; }
public static UniTask ToAnchoredPositionY(this IAnimatorWithStartValue <float> animator, GameObject gameObject, CancellationToken cancellationToken = default, SkipToken skipToken = default, IScheduler scheduler = default) => Anime.PlayTo(animator, new AnchoredPositionXTranslator(gameObject.GetComponent <RectTransform>(), 1), scheduler, CancellationTokenSource.CreateLinkedTokenSource(gameObject.GetCancellationTokenOnDestroy(), cancellationToken).Token, skipToken);
public static UniTask ToMaterialPropertyInt(this IAnimatorWithStartValue <int> animator, Renderer renderer, string name, CancellationToken cancellationToken = default, IScheduler scheduler = default) => Anime.PlayTo(animator, new MaterialPropertyIntTranslator(renderer, name), scheduler, cancellationToken);
public static UniTask ToColorA(this IAnimatorWithStartValue <float> animator, Graphic graphic, CancellationToken cancellationToken = default, SkipToken skipToken = default, IScheduler scheduler = default) => Anime.PlayTo(animator, new ColorXTranslator(graphic, 3), scheduler, CancellationTokenSource.CreateLinkedTokenSource(graphic.GetCancellationTokenOnDestroy(), cancellationToken).Token, skipToken);