Exemplo n.º 1
0
	void OnEnable()
	{
		InputManager.OnDeviceDetached += OnDeviceDetached;
		keyboardListener = ArmActions.CreateWithKeyboardBindings();
		joystickListener = ArmActions.CreateWithJoystickBindings();
		headKeyboardListener = HeadActions.CreateWithKeyboardBindings();
		headJoystickListener = HeadActions.CreateWithJoystickBindings();
	}
Exemplo n.º 2
0
		public static ArmActions CreateWithKeyboardBindings()
		{
			var actions = new ArmActions();

			actions.Grab.AddDefaultBinding( Key.Space );
			actions.WristRotateLeft.AddDefaultBinding( Key.LeftArrow );
			actions.WristRotateRight.AddDefaultBinding( Key.RightArrow );
			actions.WristExtend.AddDefaultBinding( Key.UpArrow );
			actions.WristRetract.AddDefaultBinding( Key.DownArrow );
			actions.ElbowExtend.AddDefaultBinding( Key.W );
			actions.ElbowRetract.AddDefaultBinding( Key.S );
			actions.ShoulderLiftUp.AddDefaultBinding (Key.A);
			actions.ShoulderDropDown.AddDefaultBinding (Key.D);

			return actions;
		}
Exemplo n.º 3
0
		public static ArmActions CreateWithJoystickBindings()
		{
			var actions = new ArmActions();

			actions.Grab.AddDefaultBinding ( InputControlType.Action1);

			actions.ElbowExtend.AddDefaultBinding( InputControlType.LeftStickUp );
			actions.ElbowRetract.AddDefaultBinding( InputControlType.LeftStickDown );

			actions.ShoulderLiftUp.AddDefaultBinding( InputControlType.LeftStickLeft );
			actions.ShoulderDropDown.AddDefaultBinding( InputControlType.LeftStickRight );
		
			actions.WristRotateLeft.AddDefaultBinding (InputControlType.RightStickLeft );
			actions.WristRotateRight.AddDefaultBinding (InputControlType.RightStickRight );
			actions.WristExtend.AddDefaultBinding (InputControlType.RightStickUp);
			actions.WristRetract.AddDefaultBinding (InputControlType.RightStickDown);
		

			return actions;
		}
Exemplo n.º 4
0
	bool JoinButtonWasPressedOnListener( ArmActions actions )
	{
		return actions.Grab.WasPressed;
	}