Skip to content

Instantly share code, notes, and snippets.

@kyubuns
Created October 13, 2019 15:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kyubuns/5a15010c590ee7f2240993464719e013 to your computer and use it in GitHub Desktop.
Save kyubuns/5a15010c590ee7f2240993464719e013 to your computer and use it in GitHub Desktop.
https://github.com/kyubuns/AnimeTask
await UniTask.WhenAll(
// x
new UniTask(
async () =>
{
await Anime.Play(
Easing.Create<Linear>(
startPosition.x,
targetPosition.x,
1f),
TranslateTo.GlobalPositionX(item)
);
}
),
// y
new UniTask(
async () =>
{
await Anime.Play(
Easing.Create<OutSine>(
startPosition.y,
startPosition.y + 2,
0.5f),
TranslateTo.GlobalPositionY(item)
);
await Anime.Play(
Easing.Create<InSine>(
startPosition.y + 2,
startPosition.y,
0.5f),
TranslateTo.GlobalPositionY(item)
);
}
)
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment