Example #1
0
 public static UniTask ToText(this IAnimator <float> animator, Text text, string format, CancellationToken cancellationToken = default, SkipToken skipToken = default, IScheduler scheduler = default)
 {
     CheckAlive(text);
     return(Anime.Play(animator, new TextTranslator(text, format), scheduler, CancellationTokenSource.CreateLinkedTokenSource(text.GetCancellationTokenOnDestroy(), cancellationToken).Token, skipToken));
 }
Example #2
0
 public static UniTask ToColorG(this IAnimator <float> animator, Graphic graphic, CancellationToken cancellationToken = default, SkipToken skipToken = default, IScheduler scheduler = default)
 {
     CheckAlive(graphic);
     return(Anime.Play(animator, new ColorXTranslator(graphic, 1), scheduler, CancellationTokenSource.CreateLinkedTokenSource(graphic.GetCancellationTokenOnDestroy(), cancellationToken).Token, skipToken));
 }
Example #3
0
 public static UniTask ToAction <T>(this IAnimator <T> animator, Action <T> action, CancellationToken cancellationToken = default, IScheduler scheduler = default) => Anime.Play(animator, new ActionTranslator <T>(action), scheduler, cancellationToken);
Example #4
0
 public static UniTask ToColorA(this IAnimatorWithStartValue <float> animator, CanvasGroup canvasGroup, CancellationToken cancellationToken = default, SkipToken skipToken = default, IScheduler scheduler = default)
 {
     CheckAlive(canvasGroup);
     return(Anime.PlayTo(animator, new CanvasGroupTranslator(canvasGroup), scheduler, CancellationTokenSource.CreateLinkedTokenSource(canvasGroup.GetCancellationTokenOnDestroy(), cancellationToken).Token, skipToken));
 }
Example #5
0
 public static UniTask ToLocalPositionY(this IAnimator <float> animator, GameObject gameObject, CancellationToken cancellationToken = default, SkipToken skipToken = default, IScheduler scheduler = default)
 {
     CheckAlive(gameObject);
     return(Anime.Play(animator, new LocalPositionXTranslator(gameObject.transform, 1), scheduler, CancellationTokenSource.CreateLinkedTokenSource(gameObject.GetCancellationTokenOnDestroy(), cancellationToken).Token, skipToken));
 }
Example #6
0
 public static UniTask ToProgress <T>(this IAnimator <T> animator, IProgress <T> progress, CancellationToken cancellationToken = default, SkipToken skipToken = default, IScheduler scheduler = default)
 {
     return(Anime.Play(animator, new ProgressTranslator <T>(progress), scheduler, cancellationToken, skipToken));
 }
Example #7
0
 public static UniTask ToLocalPositionX(this IAnimatorWithStartValue <float> animator, Component component, CancellationToken cancellationToken = default, SkipToken skipToken = default, IScheduler scheduler = default)
 {
     CheckAlive(component);
     return(Anime.PlayTo(animator, new LocalPositionXTranslator(component.transform, 0), scheduler, CancellationTokenSource.CreateLinkedTokenSource(component.GetCancellationTokenOnDestroy(), cancellationToken).Token, skipToken));
 }
Example #8
0
 public static UniTask ToGlobalRotation(this IAnimatorWithStartValue <Quaternion> animator, Component component, CancellationToken cancellationToken = default, SkipToken skipToken = default, IScheduler scheduler = default)
 {
     CheckAlive(component);
     return(Anime.PlayTo(animator, new GlobalRotationTranslator(component.transform), scheduler, CancellationTokenSource.CreateLinkedTokenSource(component.GetCancellationTokenOnDestroy(), cancellationToken).Token, skipToken));
 }
Example #9
0
 public static UniTask ToGlobalRotation(this IAnimator <Quaternion> animator, GameObject gameObject, CancellationToken cancellationToken = default, SkipToken skipToken = default, IScheduler scheduler = default)
 {
     CheckAlive(gameObject);
     return(Anime.Play(animator, new GlobalRotationTranslator(gameObject.transform), scheduler, CancellationTokenSource.CreateLinkedTokenSource(gameObject.GetCancellationTokenOnDestroy(), cancellationToken).Token, skipToken));
 }
Example #10
0
 public static UniTask ToLocalScale(this IAnimatorWithStartValue <Vector2> animator, GameObject gameObject, CancellationToken cancellationToken = default, SkipToken skipToken = default, IScheduler scheduler = default)
 {
     CheckAlive(gameObject);
     return(Anime.PlayTo(animator, new LocalScaleTranslator(gameObject.transform), scheduler, CancellationTokenSource.CreateLinkedTokenSource(gameObject.GetCancellationTokenOnDestroy(), cancellationToken).Token, skipToken));
 }
Example #11
0
 public static UniTask ToLocalScale(this IAnimator <Vector2> animator, Component component, CancellationToken cancellationToken = default, SkipToken skipToken = default, IScheduler scheduler = default)
 {
     CheckAlive(component);
     return(Anime.Play(animator, new LocalScaleTranslator(component.transform), scheduler, CancellationTokenSource.CreateLinkedTokenSource(component.GetCancellationTokenOnDestroy(), cancellationToken).Token, skipToken));
 }