void AssignIntroInputs() { InputControl.AddInputMapping(0, this); InputControl.AddInputHandler(InputControl.eDeviceType.Keyboard, "space", StartIntro, null, null, 0); for (int i = 1; i < 4; ++i) { InputControl.AddInputMapping(i, this); InputControl.AddInputHandler(InputControl.eDeviceType.Gamepad, InputControl.Button.A, StartIntro, null, null, i); } }
private void Start() { InputControl.AddInputMapping(1, this); InputControl.AddInputHandler(InputControl.eDeviceType.Keyboard, "l", OnKeyDown_Nil, OnKeyHeld_Nil, OnKeyUp_l); InputControl.AddInputHandler(InputControl.eDeviceType.Keyboard, "space", OnKeyDown_Space, OnKeyHeld_Nil, OnKeyUp_Nil); InputControl.AddInputHandler(InputControl.eDeviceType.Keyboard, "n", OnKeyDown_Nil, OnKeyHeld_Nil, OnKeyUp_N); InputControl.AddInputHandler(InputControl.eDeviceType.Mouse, InputControl.eMouseButton.Left, OnKeyDown_Space, OnKeyHeld_Nil, OnKeyUp_Nil); InputControl.AddInputHandler(InputControl.eDeviceType.Mouse, InputControl.eMouseButton.Right, OnKeyDown_Nil, OnKeyHeld_Nil, OnKeyUp_N); InputControl.AddInputHandler(InputControl.eDeviceType.Gamepad, OVRGamepadController.Button.A, OnButtonDown_A, OnKeyHeld_Nil, OnKeyUp_Nil); InputControl.AddInputHandler(InputControl.eDeviceType.Gamepad, OVRGamepadController.Button.B, OnButtonDown_B, OnKeyHeld_Nil, OnKeyUp_Nil); InputControl.AddInputHandler(InputControl.eDeviceType.Gamepad, OVRGamepadController.Button.X, OnButtonDown_X, OnKeyHeld_Nil, OnKeyUp_Nil); InputControl.AddInputHandler(InputControl.eDeviceType.Gamepad, OVRGamepadController.Button.Y, OnButtonDown_Y, OnKeyHeld_Nil, OnKeyUp_Nil); InputControl.AddInputHandler(InputControl.eDeviceType.Gamepad, OVRGamepadController.Button.LeftShoulder, OnButtonDown_LeftShoulder, OnKeyHeld_Nil, OnKeyUp_Nil); InputControl.AddInputHandler(InputControl.eDeviceType.Axis, OVRGamepadController.Axis.LeftTrigger, OnButtonDown_LeftTrigger, OnKeyHeld_Nil, OnKeyUp_Nil); Score.TitleScreen = true; _started = false; _startTime = Time.time + _startDelay; }