void Start() { tapInputManager = TapInputManager.Instance; tapInputManager.OnTapInputReceived += onTapped; tapInputManager.OnTapConnected += onTapConnected; tapInputManager.OnTapDisconnected += onTapDisconnected; tapInputManager.OnMouseInputReceived += onMoused; tapInputManager.OnAirGestureInputReceived += onAirGestureInputReceived; tapInputManager.OnTapChangedAirGestureState += onTapChangedState; tapInputManager.OnRawSensorDataReceived += onRawSensorDataReceived; tapInputManager.EnableDebug(); tapInputManager.SetDefaultControllerWithMouseHIDMode(true); mouseHIDEnabled = false; }
#pragma warning restore 0067 public override void OnInit() { #if UNITY_EDITOR tapInput = TapInputEditor.Instance; #elif UNITY_ANDROID tapInput = TapInputAndroid.Instance; #elif UNITY_IOS tapInput = TapInputIOS.Instance; //#elif UNITY_STANDALONE_WIN // tapInput = TapInputStandaloneWin.Instance; #endif tapInput.OnTapConnected += onTapConnected; tapInput.OnTapDisconnected += onTapDisconnected; tapInput.OnTapInputReceived += onTapped; tapInput.OnBluetoothTurnedOn += onBluetoothTurnedOn; tapInput.OnBluetoothTurnedOff += onBluetoothTurnedOff; tapInput.OnMouseInputReceived += onMoused; tapInput.OnAirGestureInputReceived += onAirGestureInputReceived; tapInput.OnTapChangedAirGestureState += onTapChangedAirGestureState; tapInput.OnRawSensorDataReceived += onRawSensorDataReceived; }