Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var mouseCountStream = Observable.EveryUpdate()
- .Where(_ => Input.GetMouseButtonDown(0))// mousePress stream
- .Select(_ => 1)//each mousePress, we emit "1" value
- .Scan((previous, current) => previous + current)//counting
- .Subscribe(x => Debug.Log("Press count : " + x));
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement