private void Beacon(KeyAndState key) { var position = this.camera.Position; Observable .Return(0, this.Engine.InputScheduler).Delay(TimeSpan.FromSeconds(10)) .Subscribe( (x) => this.camera.Position = position ); }
private void SelectPrevButton(KeyAndState kas) { var button = this.currentButton.First(); var index = buttons.IndexOf(button); if(--index < 0) { index = buttons.Count - 1; } this.oldButton.OnNext(button); this.currentButton.OnNext(buttons[index]); }
private void SelectNextButton(KeyAndState kas) { var button = this.currentButton.First(); var index = buttons.IndexOf(button); if (++index >= buttons.Count) { index = 0; } this.oldButton.OnNext(button); this.currentButton.OnNext(buttons[index]); }