예제 #1
0
        private void Start()
        {
            // InputSw.IsLogWrite = true; // Default

            this.OnKeyDownAsObservable(KeyCode.H)
            .Subscribe(_ => {
                InputSw.Switch(hoge);
            });

            this.OnKeyDownAsObservable(KeyCode.F)
            .Subscribe(_ => {
                InputSw.Switch(foo);
            });

            this.OnKeyDownAsObservable(KeyCode.P)
            .Subscribe(_ => {
                InputSw.Pause();
                // InputSw.IsActive = false;
            });

            this.OnKeyDownAsObservable(KeyCode.R)
            .Subscribe(_ => {
                InputSw.Resume();
                // InputSw.IsActive = true;
            });
        }
예제 #2
0
 void Start()
 {
     InputSw.GetKey(this, KeyCode.C)
     .Subscribe(_ => { Debug.Log("Foo"); });
 }