Created
October 13, 2019 15:20
-
-
Save kyubuns/5a15010c590ee7f2240993464719e013 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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