Esempio n. 1
0
 void Start()
 {
     Observable.Interval(TimeSpan.FromMilliseconds(500))
     .TakeUntil(playerCore.ClearedAsObservable())
     .Subscribe(_ =>
     {
         timeLabel.text = (int)Time.realtimeSinceStartup + "秒";
     })
     .AddTo(this);
 }
Esempio n. 2
0
 void Start()
 {
     _timeText.color = Color.white;
     _playerCore.ClearedAsObservable()
     .SelectMany(_ => Observable.Timer(TimeSpan.FromSeconds(2)))
     .Do(_ => ShowResult())
     .SelectMany(_ => Observable.Timer(TimeSpan.FromSeconds(5)))
     .Subscribe(_ => SceneManager.LoadScene("Main"))
     .AddTo(this);
 }