Last active
July 10, 2017 02:09
-
-
Save h-sao/5cb4f8aaed954646216b45a9029cdad6 to your computer and use it in GitHub Desktop.
UniRx timer sample
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
var timerSubscription = OBservble.Timer(TimeSpan.FromSeconds(30a) | |
.Subscribe(_ => nextScene())); | |
OBservble.EverUpdate().Select(_=> Input.AnyKey).Where(x=>x == true) | |
.Subscribe(x => | |
{ | |
timerSubscription.Dispose(); | |
timerSubscription = OBservble.Timer(TimeSpan.FromSeconds(30a) | |
.Subscribe(_ => nextScene())); | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment