/// <summary> /// Create an aggregate, single-axis action on this set. This should be performed in the constructor of your PlayerActionSet subclass. /// </summary> /// <example> /// <code> /// Throttle = CreateOneAxisPlayerAction( Brake, Accelerate ); /// </code> /// </example> /// <param name="negativeAction">The action to query for the negative component of the axis.</param> /// <param name="positiveAction">The action to query for the positive component of the axis.</param> protected PlayerOneAxisAction CreateOneAxisPlayerAction(PlayerAction negativeAction, PlayerAction positiveAction) { var action = new PlayerOneAxisAction(negativeAction, positiveAction); oneAxisActions.Add(action); return(action); }
public MonkActions(InputDevice device) { spawn0 = CreatePlayerAction ("Spawn0"); spawn1 = CreatePlayerAction ("Spawn1"); spawn2 = CreatePlayerAction ("Spawn2"); spawn3 = CreatePlayerAction ("Spawn3"); fireTurret = CreatePlayerAction ("FireTurret"); moveUnitLeft = CreatePlayerAction ("MoveUnitLeft"); moveUnitRight = CreatePlayerAction ("MoveUnitRight"); moveHorizontal = CreateOneAxisPlayerAction (moveUnitLeft, moveUnitRight); moveUnitUp = CreatePlayerAction ("MoveUnitUp"); moveUnitDown = CreatePlayerAction ("MoveUnitDown"); moveVertical = CreateOneAxisPlayerAction (moveUnitDown,moveUnitUp); Device = device; spawn0.AddDefaultBinding (InputControlType.Action1); spawn1.AddDefaultBinding (InputControlType.Action2); spawn2.AddDefaultBinding (InputControlType.Action3); spawn3.AddDefaultBinding (InputControlType.Action4); fireTurret.AddDefaultBinding (InputControlType.RightTrigger); moveUnitLeft.AddDefaultBinding (InputControlType.LeftStickLeft); moveUnitRight.AddDefaultBinding (InputControlType.LeftStickRight); moveUnitUp.AddDefaultBinding (InputControlType.LeftStickUp); moveUnitDown.AddDefaultBinding (InputControlType.LeftStickDown); }
public PlayerControls() { MouseLeft = CreatePlayerAction("Mouse Left Click"); MouseRight = CreatePlayerAction("Mouse Right Click"); LookButton = CreatePlayerAction("Mouse look"); ZoomIn = CreatePlayerAction("Zoom in (mouse)"); ZoomOut = CreatePlayerAction("Zoom out (mouse)"); Zoom = CreateOneAxisPlayerAction(ZoomIn, ZoomOut); ZoomKeyboardIn = CreatePlayerAction("Zoom in (keyboard)"); ZoomKeyboardOut = CreatePlayerAction("Zoom out (keyboard)"); ZoomKeyboard = CreateOneAxisPlayerAction(ZoomKeyboardIn, ZoomKeyboardOut); MousePositiveX = CreatePlayerAction("Look positive X (mouse)"); MousePositiveY = CreatePlayerAction("Look positive Y (mouse)"); MouseNegativeX = CreatePlayerAction("Look negative X (mouse)"); MouseNegativeY = CreatePlayerAction("Look negative Y (mouse)"); LookMouse = CreateTwoAxisPlayerAction(MouseNegativeX, MousePositiveX, MouseNegativeY, MousePositiveY); KeyboardPositiveX = CreatePlayerAction("Look positive X (keyboard)"); KeyboardPositiveY = CreatePlayerAction("Look positive Y (keyboard)"); KeyboardNegativeX = CreatePlayerAction("Look negative X (keyboard)"); KeyboardNegativeY = CreatePlayerAction("Look negative Y (keyboard)"); LookKeyboard = CreateTwoAxisPlayerAction(KeyboardNegativeX, KeyboardPositiveX, KeyboardNegativeY, KeyboardPositiveY); }
public PlayerActions() { Left = CreatePlayerAction( "Move Left" ); Right = CreatePlayerAction( "Move Right" ); Jump = CreatePlayerAction( "Jump" ); Shift = CreatePlayerAction ("Kinetic Shift"); Move = CreateOneAxisPlayerAction (Left, Right); }
private CourierPlayer() { Pedal = CreatePlayerAction("Pedal"); Brake = CreatePlayerAction("Brake"); SteeringColumnL = CreatePlayerAction("SteeringColumnL"); SteeringColumnR = CreatePlayerAction("SteeringColumnR"); SteeringColumnKeys = CreateOneAxisPlayerAction(SteeringColumnL, SteeringColumnR); SteeringColumnGyro = CreatePlayerAction("SteeringColumnGyro"); }
public BallActions() { Left = CreatePlayerAction( "Move Left" ); Right = CreatePlayerAction( "Move Right" ); Up = CreatePlayerAction( "Move Up" ); Down = CreatePlayerAction( "Move Down" ); Jump = CreatePlayerAction( "Jump" ); Shift = CreatePlayerAction ("Kinetic Shift"); Brake = CreatePlayerAction ("Brake"); Move = CreateOneAxisPlayerAction (Left, Right); JumpDirection = CreateTwoAxisPlayerAction (Left, Right, Down, Up); }
//public PlayerAction useItem; public PlayerActions() { moveLeft = CreatePlayerAction("MoveLeft"); moveRight = CreatePlayerAction("MoveRight"); horizontalMovement = CreateOneAxisPlayerAction(moveLeft, moveRight); moveUp = CreatePlayerAction("MoveUp"); moveDown = CreatePlayerAction("MoveDown"); verticalMovement = CreateOneAxisPlayerAction(moveDown, moveUp); prevSpell = CreatePlayerAction("PrevSpell"); nextSpell = CreatePlayerAction("NextSpell"); dodge = CreatePlayerAction("Dodge"); }
// Use this for initialization public AlienInputActions() { shoot = CreatePlayerAction(" shoot "); explode = CreatePlayerAction(" explode "); reset = CreatePlayerAction(" reset "); leftStickLeft = CreatePlayerAction("left"); leftStickRight = CreatePlayerAction("right"); leftStickUp = CreatePlayerAction("up"); leftStickDown = CreatePlayerAction("down"); leftStickXPosition = CreateOneAxisPlayerAction(leftStickLeft, leftStickRight); leftStickYPosition = CreateOneAxisPlayerAction(leftStickDown, leftStickUp); }
public ArmActions() { Grab = CreatePlayerAction( "Grab" ); WristRotateLeft = CreatePlayerAction( "WristRotateLeft" ); WristRotateRight = CreatePlayerAction( "WristRotateRight" ); WristExtend = CreatePlayerAction( "WristExtend" ); WristRetract = CreatePlayerAction( "WristRetract" ); ElbowExtend = CreatePlayerAction( "ElbowExtend" ); ElbowRetract = CreatePlayerAction( "ElbowRetract" ); ShoulderLiftUp = CreatePlayerAction ("ShoulderLiftUp"); ShoulderDropDown = CreatePlayerAction ("ShoulderDropDown"); WristRotateAxis = CreateOneAxisPlayerAction(WristRotateRight, WristRotateLeft); WristExtendAxis = CreateOneAxisPlayerAction(WristRetract, WristExtend); ElbowExtendAxis = CreateOneAxisPlayerAction(ElbowRetract,ElbowExtend); ShoulderLiftAxis = CreateOneAxisPlayerAction(ShoulderLiftUp, ShoulderDropDown); }
public HeadActions() { Grab = CreatePlayerAction( "Grab" ); Left = CreatePlayerAction( "Left" ); Right = CreatePlayerAction( "Right" ); Up = CreatePlayerAction( "Up" ); Down = CreatePlayerAction( "Down" );; SpinLeft = CreatePlayerAction ("SpinLeft"); SpinRight = CreatePlayerAction ("SpinRight"); SpinForward = CreatePlayerAction ("SpinForward"); SpinBackward = CreatePlayerAction ("SpinBackward"); Raise = CreatePlayerAction("Raise"); Lower = CreatePlayerAction("Lower"); Height = CreateOneAxisPlayerAction(Lower, Raise); Rotate = CreateTwoAxisPlayerAction(SpinRight, SpinLeft, SpinForward, SpinBackward); Pan = CreateTwoAxisPlayerAction(Left,Right,Down,Up); }
public AttackerActions(InputDevice device) { attackerAttack = CreatePlayerAction ("AttackerAttack"); moveAttackerLeft = CreatePlayerAction ("MoveUnitLeft"); moveAttackerRight = CreatePlayerAction ("MoveUnitRight"); moveAttackerHorizontal = CreateOneAxisPlayerAction (moveAttackerLeft, moveAttackerRight); moveAttackerUp = CreatePlayerAction ("MoveUnitUp"); moveAttackerDown = CreatePlayerAction ("MoveUnitDown"); moveAttackerVertical = CreateOneAxisPlayerAction (moveAttackerDown,moveAttackerUp); this.Device = device; attackerAttack.AddDefaultBinding (InputControlType.Action1); moveAttackerLeft.AddDefaultBinding (InputControlType.LeftStickLeft); moveAttackerRight.AddDefaultBinding (InputControlType.LeftStickRight); moveAttackerUp.AddDefaultBinding (InputControlType.LeftStickUp); moveAttackerDown.AddDefaultBinding (InputControlType.LeftStickDown); }
public ChopstickActions01() { LStickLeft = CreatePlayerAction("Move LStick Left"); LStickRight = CreatePlayerAction("Move LStick Right"); LStickUp = CreatePlayerAction("Move LStick Up"); LStickDown = CreatePlayerAction("Move LStick Down"); LStickMove = CreateTwoAxisPlayerAction(LStickLeft, LStickRight, LStickDown, LStickUp); LStickRotateLeft = CreatePlayerAction("Rotate LStick Left"); LStickRotateRight = CreatePlayerAction("Rotate LStick Rigth"); LStickRotate = CreateOneAxisPlayerAction(LStickRotateLeft, LStickRotateRight); RStickLeft = CreatePlayerAction("Move RStick Left"); RStickRight = CreatePlayerAction("Move RStick Right"); RStickUp = CreatePlayerAction("Move RStick Up"); RStickDown = CreatePlayerAction("Move RStick Down"); RStickMove = CreateTwoAxisPlayerAction(RStickLeft, RStickRight, RStickDown, RStickUp); RStickRotateLeft = CreatePlayerAction("Rotate RStick Left"); RStickRotateRight = CreatePlayerAction("Rotate RStick Rigth"); RStickRotate = CreateOneAxisPlayerAction(RStickRotateLeft, RStickRotateRight); }
public PlayerInputActions() { left = CreatePlayerAction("left"); right = CreatePlayerAction("right"); up = CreatePlayerAction("up"); down = CreatePlayerAction("down"); rStickLeft = CreatePlayerAction("rStickLeft"); rStickRight = CreatePlayerAction("rStickRight"); rStickUp = CreatePlayerAction("rStickUp"); rStickDown = CreatePlayerAction("rStickDown"); moveHorizontally = CreateOneAxisPlayerAction(left, right); moveVertically = CreateOneAxisPlayerAction(down, up); throwHorizontally = CreateOneAxisPlayerAction(rStickLeft, rStickRight); throwVertically = CreateOneAxisPlayerAction(rStickDown, rStickUp); interact = CreatePlayerAction("interact"); secondAttack = CreatePlayerAction("secondAttack"); thirdAttack = CreatePlayerAction("thirdAttack"); nextTrack = CreatePlayerAction("nextTrack"); previousTrack = CreatePlayerAction("previousTrack"); roll = CreatePlayerAction("roll"); pause = CreatePlayerAction("pause"); back = CreatePlayerAction("back"); menuSelect = CreatePlayerAction("menuSelect"); menuLeft = CreatePlayerAction("menuLeft"); menuRight = CreatePlayerAction("menuRight"); menuUp = CreatePlayerAction("menuUp"); menuDown = CreatePlayerAction("menuDown"); dance = CreatePlayerAction("select"); }
/// <summary> /// Create an aggregate, single-axis action on this set. This should be performed in the constructor of your PlayerActionSet subclass. /// </summary> /// <example> /// <code> /// Throttle = CreateOneAxisPlayerAction( Brake, Accelerate ); /// </code> /// </example> /// <param name="negativeAction">The action to query for the negative component of the axis.</param> /// <param name="positiveAction">The action to query for the positive component of the axis.</param> protected PlayerOneAxisAction CreateOneAxisPlayerAction( PlayerAction negativeAction, PlayerAction positiveAction ) { var action = new PlayerOneAxisAction( negativeAction, positiveAction ); oneAxisActions.Add( action ); return action; }
public TestInputSet() { expand = CreatePlayerAction("Expand"); //expand.AddDefaultBinding(Mouse.RightButton); //expand.AddDefaultBinding(Key.Space); //expand.AddDefaultBinding(InputControlType.Action4); cancel = CreatePlayerAction("Cancel"); cancel.AddDefaultBinding(Mouse.RightButton); cancel.AddDefaultBinding(Key.Escape); cancel.AddDefaultBinding(InputControlType.Action2); { var up = CreatePlayerAction("Up"); var down = CreatePlayerAction("Down"); var left = CreatePlayerAction("Left"); var right = CreatePlayerAction("Right"); up.AddDefaultBinding(Key.W); down.AddDefaultBinding(Key.S); left.AddDefaultBinding(Key.A); right.AddDefaultBinding(Key.D); up.AddDefaultBinding(InputControlType.LeftStickUp); down.AddDefaultBinding(InputControlType.LeftStickDown); left.AddDefaultBinding(InputControlType.LeftStickLeft); right.AddDefaultBinding(InputControlType.LeftStickRight); move = CreateTwoAxisPlayerAction(left, right, down, up); move.StateThreshold = 0.5f; } { var cw = CreatePlayerAction("Turn CW"); var acw = CreatePlayerAction("Turn ACW"); cw.AddDefaultBinding(Key.E); acw.AddDefaultBinding(Key.Q); turn = CreateOneAxisPlayerAction(cw, acw); } { var up = CreatePlayerAction("Cursor Up"); var down = CreatePlayerAction("Cursor Down"); var left = CreatePlayerAction("Cursor Left"); var right = CreatePlayerAction("Cursor Right"); up.AddDefaultBinding(InputControlType.RightStickUp); down.AddDefaultBinding(InputControlType.RightStickDown); left.AddDefaultBinding(InputControlType.RightStickLeft); right.AddDefaultBinding(InputControlType.RightStickRight); cursor = CreateTwoAxisPlayerAction(left, right, down, up); click = CreatePlayerAction("Cursor Click"); click.AddDefaultBinding(InputControlType.RightTrigger); } { var zoomIn = CreatePlayerAction("Zoom In"); var zoomOut = CreatePlayerAction("Zoom Out"); zoomIn.AddDefaultBinding(InputControlType.LeftStickButton); zoomOut.AddDefaultBinding(InputControlType.RightStickButton); zoomIn.AddDefaultBinding(Key.Equals); zoomOut.AddDefaultBinding(Key.Minus); zoom = CreateOneAxisPlayerAction(zoomOut, zoomIn); } }
public MyCharacterActions() { Left = CreatePlayerAction("Move Left"); Right = CreatePlayerAction("Move Right"); Up = CreatePlayerAction("Move Up"); Down = CreatePlayerAction("Move Down"); Jump = CreatePlayerAction("Jump"); Accelerate = CreatePlayerAction("Accelerate"); SwitchPolarity = CreatePlayerAction("Switch Polarity"); SwitchToNormal = CreatePlayerAction("Switch To Normal"); Boost = CreatePlayerAction("Boost"); Select = CreatePlayerAction("Select"); Move = CreateOneAxisPlayerAction(Left, Right); }