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; }); }
void Start() { InputSw.GetKey(this, KeyCode.C) .Subscribe(_ => { Debug.Log("Foo"); }); }