public int ReturnLaunchOrPauseOrNothingIsPressed() { for (int i = 0; i < 4; i++) { if (Input.GetKeyDown((KeyCode)(350 + 20 * i))) { return(1); } if (Input.GetKeyDown((KeyCode)(357 + 20 * i))) { return(2); } } InputVal launch = GetInputVal(saveInfo.GetBinding(InputMethod.KeyBinding.launch, 0, usingGamepad1)); InputVal pause = GetInputVal(saveInfo.GetBinding(InputMethod.KeyBinding.pause, 0, usingGamepad1)); if (Input.GetMouseButtonDown(0) || launch.KeyDown()) { return(1); } if (pause.KeyDown()) { return(2); } return(0); }
public InputMethod detectInput_P2() { if (usingGamepad2) { for (int i = 0; i < 4; i++) { if (Input.GetKeyDown((KeyCode)(350 + 20 * i))) { UpdateGamepad(1, i); break; } } } InputVal launch = GetInputVal(saveInfo.GetBinding(InputMethod.KeyBinding.launch, 1, usingGamepad2)); InputVal pause = GetInputVal(saveInfo.GetBinding(InputMethod.KeyBinding.pause, 1, usingGamepad2)); if (launch.KeyDown() || pause.KeyDown()) { return(new Input_Computer()); } return(null); }