Skip to content

Instantly share code, notes, and snippets.

@divide-by-zero
Last active August 29, 2015 14:25
Show Gist options
  • Save divide-by-zero/d4bbaefc89c14bae7469 to your computer and use it in GitHub Desktop.
Save divide-by-zero/d4bbaefc89c14bae7469 to your computer and use it in GitHub Desktop.
1秒長押しStream
var longClickStream = UpdateAsObservable().Select(_ => Input.GetMouseButton(0)).DistinctUntilChanged().Throttle(TimeSpan.FromMilliseconds(1000)).Where(b => b);
@divide-by-zero
Copy link
Author

よく考えればintにしなくてもboolのままで良いのだった。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment