Last active
February 23, 2021 04:17
-
-
Save kyubuns/885634c6aa0fbb2d318174c0ebe795d9 to your computer and use it in GitHub Desktop.
https://github.com/kyubuns/AnimeTask 1.4.0で入ったUniRxExtensionのサンプル
This file contains hidden or 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
var score = new ReactiveProperty<int>(0); | |
score | |
.SubscribeTask(async (x, c) => | |
{ | |
scoreCounter.text = $"{x}"; | |
await Easing.Create<OutBounce>(Vector3.one * 2f, Vector3.one, 0.5f).ToLocalScale(scoreCounter, c); | |
}); | |
while (true) | |
{ | |
_score.Value++; | |
await UniTask.Delay(TimeSpan.FromSeconds(1)); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment