public SdlInput(bool fullscreen) { keyBoardInput = new KeyBoardInput(); joyStick = new JoyStick(0); mouseInput = new MouseInput(); if (fullscreen) { mouseInput.Hide(); } }
public InputDevice(bool showCursor, int jumpButton, int attackButton, int startButton) { keyBoard = new KeyBoardInput(); joyStick = new JoyStick(0); mouse = new MouseInput(); if (showCursor) { mouse.Show(); } else { mouse.Hide(); } this.jumpButton = jumpButton + 4; this.attackButton = attackButton + 4; this.startButton = startButton + 4; }
/// <summary> /// /// </summary> public Key1() { keyboard = new KeyBoardInput(); joystick = new JoyStick(0); AddDevice(keyboard); AddDevice(joystick); // 0 : Escape AddKey(0, 0, (int)KeyCode.ESCAPE); // 1 : Up AddKey(1, 0, (int)KeyCode.KP8); AddKey(1, 0, (int)KeyCode.UP); AddKey(1, 1, 0); // 2 : Down AddKey(2, 0, (int)KeyCode.KP2); AddKey(2, 0, (int)KeyCode.DOWN); AddKey(2, 1, 1); // 3 : Left AddKey(3, 0, (int)KeyCode.KP4); AddKey(3, 0, (int)KeyCode.LEFT); AddKey(3, 1, 2); // 4 : Right AddKey(4, 0, (int)KeyCode.KP6); AddKey(4, 0, (int)KeyCode.RIGHT); AddKey(4, 1, 3); // 5 : Space AddKey(5, 0, (int)KeyCode.SPACE); AddKey(5, 1, 4); // 6 : Return AddKey(6, 0, (int)KeyCode.RETURN); AddKey(6, 0, (int)KeyCode.KP_ENTER); AddKey(6, 0, (int)KeyCode.LSHIFT); AddKey(6, 0, (int)KeyCode.RSHIFT); AddKey(6, 1, 5); }
/// <summary> /// /// </summary> public Key1() { keyboard = new KeyBoardInput(); joystick = new JoyStick(0); AddDevice(keyboard); AddDevice(joystick); // 0 : Escape AddKey(0,0,(int)KeyCode.ESCAPE); // 1 : Up AddKey(1,0,(int)KeyCode.KP8); AddKey(1,0,(int)KeyCode.UP); AddKey(1,1,0); // 2 : Down AddKey(2,0,(int)KeyCode.KP2); AddKey(2,0,(int)KeyCode.DOWN); AddKey(2,1,1); // 3 : Left AddKey(3,0,(int)KeyCode.KP4); AddKey(3,0,(int)KeyCode.LEFT); AddKey(3,1,2); // 4 : Right AddKey(4,0,(int)KeyCode.KP6); AddKey(4,0,(int)KeyCode.RIGHT); AddKey(4,1,3); // 5 : Space AddKey(5,0,(int)KeyCode.SPACE); AddKey(5,1,4); // 6 : Return AddKey(6,0,(int)KeyCode.RETURN); AddKey(6,0,(int)KeyCode.KP_ENTER); AddKey(6,0,(int)KeyCode.LSHIFT); AddKey(6,0,(int)KeyCode.RSHIFT); AddKey(6,1,5); }
/// <summary> /// /// </summary> public Key2() { keyboard = new KeyBoardInput(); joystick = new JoyStick(0); AddDevice(keyboard); AddDevice(joystick); // 0 : Escape AddKey(0, 0, (int)KeyCode.ESCAPE); AddKey(0, 1, 10); AddKey(0, 1, 11); AddKey(0, 1, 12); // 1 : Up AddKey(1, 0, (int)KeyCode.KP8); AddKey(1, 0, (int)KeyCode.UP); AddKey(1, 1, 0); // 2 : Down AddKey(2, 0, (int)KeyCode.KP2); AddKey(2, 0, (int)KeyCode.DOWN); AddKey(2, 1, 1); // 3 : Left AddKey(3, 0, (int)KeyCode.KP4); AddKey(3, 0, (int)KeyCode.LEFT); AddKey(3, 1, 2); // 4 : Right AddKey(4, 0, (int)KeyCode.KP6); AddKey(4, 0, (int)KeyCode.RIGHT); AddKey(4, 1, 3); // 5 : Space AddKey(5, 0, (int)KeyCode.SPACE); AddKey(5, 0, (int)KeyCode.z); AddKey(5, 1, 4); // 6 : Return AddKey(6, 0, (int)KeyCode.RETURN); AddKey(6, 0, (int)KeyCode.KP_ENTER); AddKey(6, 0, (int)KeyCode.LSHIFT); AddKey(6, 0, (int)KeyCode.RSHIFT); AddKey(6, 0, (int)KeyCode.x); AddKey(6, 1, 5); // 7 : Button C AddKey(7, 0, (int)KeyCode.c); AddKey(7, 1, 6); // 8 : Button A AddKey(8, 0, (int)KeyCode.a); AddKey(8, 1, 7); // 9 : Button S AddKey(9, 0, (int)KeyCode.s); AddKey(9, 1, 8); // 10 : Button D AddKey(10, 0, (int)KeyCode.d); AddKey(10, 1, 9); }
/// <summary> /// /// </summary> public Key2() { keyboard = new KeyBoardInput(); joystick = new JoyStick(0); AddDevice(keyboard); AddDevice(joystick); // 0 : Escape AddKey(0,0,(int)KeyCode.ESCAPE); AddKey(0,1,10); AddKey(0,1,11); AddKey(0,1,12); // 1 : Up AddKey(1,0,(int)KeyCode.KP8); AddKey(1,0,(int)KeyCode.UP); AddKey(1,1,0); // 2 : Down AddKey(2,0,(int)KeyCode.KP2); AddKey(2,0,(int)KeyCode.DOWN); AddKey(2,1,1); // 3 : Left AddKey(3,0,(int)KeyCode.KP4); AddKey(3,0,(int)KeyCode.LEFT); AddKey(3,1,2); // 4 : Right AddKey(4,0,(int)KeyCode.KP6); AddKey(4,0,(int)KeyCode.RIGHT); AddKey(4,1,3); // 5 : Space AddKey(5,0,(int)KeyCode.SPACE); AddKey(5,0,(int)KeyCode.z); AddKey(5,1,4); // 6 : Return AddKey(6,0,(int)KeyCode.RETURN); AddKey(6,0,(int)KeyCode.KP_ENTER); AddKey(6,0,(int)KeyCode.LSHIFT); AddKey(6,0,(int)KeyCode.RSHIFT); AddKey(6,0,(int)KeyCode.x); AddKey(6,1,5); // 7 : Button C AddKey(7,0,(int)KeyCode.c); AddKey(7,1,6); // 8 : Button A AddKey(8,0,(int)KeyCode.a); AddKey(8,1,7); // 9 : Button S AddKey(9,0,(int)KeyCode.s); AddKey(9,1,8); // 10 : Button D AddKey(10,0,(int)KeyCode.d); AddKey(10,1,9); }