void instance_BlanketEvent(JoystickManager.BLANKET_NUMBER_KEY key, JoystickManager.JOYSTICK_KEY_STATE state) { if (DataUtils.runingAutoMode) { Global.CancelAutoMode(); return; } blanketPress = true; pressTime = Time.time; switch (key) { case JoystickManager.BLANKET_NUMBER_KEY.KEY_6: case JoystickManager.BLANKET_NUMBER_KEY.KEY_21: if (canPressUp) { Move(0, -1, INPUT_TYPE.BLANKET, state, key == JoystickManager.BLANKET_NUMBER_KEY.KEY_6 ? JoystickManager.PLAYER_INDEX.P1 : JoystickManager.PLAYER_INDEX.P2); } break; case JoystickManager.BLANKET_NUMBER_KEY.KEY_10: case JoystickManager.BLANKET_NUMBER_KEY.KEY_25: if (canPressDown) { Move(0, 1, INPUT_TYPE.BLANKET, state, key == JoystickManager.BLANKET_NUMBER_KEY.KEY_10 ? JoystickManager.PLAYER_INDEX.P1 : JoystickManager.PLAYER_INDEX.P2); } break; case JoystickManager.BLANKET_NUMBER_KEY.KEY_3: case JoystickManager.BLANKET_NUMBER_KEY.KEY_18: if (canPressLeft) { Move(-1, 0, INPUT_TYPE.BLANKET, state, key == JoystickManager.BLANKET_NUMBER_KEY.KEY_3 ? JoystickManager.PLAYER_INDEX.P1 : JoystickManager.PLAYER_INDEX.P2); } break; case JoystickManager.BLANKET_NUMBER_KEY.KEY_13: case JoystickManager.BLANKET_NUMBER_KEY.KEY_28: if (canPressRight) { Move(1, 0, INPUT_TYPE.BLANKET, state, key == JoystickManager.BLANKET_NUMBER_KEY.KEY_13 ? JoystickManager.PLAYER_INDEX.P1 : JoystickManager.PLAYER_INDEX.P2); } break; case JoystickManager.BLANKET_NUMBER_KEY.KEY_11: case JoystickManager.BLANKET_NUMBER_KEY.KEY_26: if (canPressEnter) { if (state == JoystickManager.JOYSTICK_KEY_STATE.KEY_DOWN) { PressEnter(INPUT_TYPE.BLANKET, state, key == JoystickManager.BLANKET_NUMBER_KEY.KEY_11 ? JoystickManager.PLAYER_INDEX.P1 : JoystickManager.PLAYER_INDEX.P2); } } break; case JoystickManager.BLANKET_NUMBER_KEY.KEY_1: case JoystickManager.BLANKET_NUMBER_KEY.KEY_16: if (Application.platform != RuntimePlatform.Android /* || Version.currentPlatform.ToString().IndexOf("WX_XRDS") != -1*/) { if (canPressCancel) { if (state == JoystickManager.JOYSTICK_KEY_STATE.KEY_DOWN) { Cancel(INPUT_TYPE.BLANKET, state, key == JoystickManager.BLANKET_NUMBER_KEY.KEY_1 ? JoystickManager.PLAYER_INDEX.P1 : JoystickManager.PLAYER_INDEX.P2); } } } break; } if (Application.platform != RuntimePlatform.Android) { if (state == JoystickManager.JOYSTICK_KEY_STATE.KEY_DOWN && key == JoystickManager.BLANKET_NUMBER_KEY.KEY_15) { DataUtils.AddMoney(1000); } } }
void instance_BlanketEvent(JoystickManager.BLANKET_NUMBER_KEY key, JoystickManager.JOYSTICK_KEY_STATE state) { if (loginUI.activeSelf == false) { return; } if (state != JoystickManager.JOYSTICK_KEY_STATE.KEY_DOWN) { return; } if (keyboard.gameObject.activeSelf || numKeyboard.gameObject.activeSelf) { Keyboard k = keyboard.gameObject.activeSelf ? keyboard : numKeyboard; switch (key) { case JoystickManager.BLANKET_NUMBER_KEY.KEY_3: k.Move(-1, 0); break; case JoystickManager.BLANKET_NUMBER_KEY.KEY_13: k.Move(1, 0); break; case JoystickManager.BLANKET_NUMBER_KEY.KEY_6: k.Move(0, -1); break; case JoystickManager.BLANKET_NUMBER_KEY.KEY_10: k.Move(0, 1); break; case JoystickManager.BLANKET_NUMBER_KEY.KEY_11: k.Enter(); break; case JoystickManager.BLANKET_NUMBER_KEY.KEY_1: if (Application.platform != RuntimePlatform.Android) { k.Cancel(); } break; } return; } switch (key) { case JoystickManager.BLANKET_NUMBER_KEY.KEY_3: SwitchPanel(-1); break; case JoystickManager.BLANKET_NUMBER_KEY.KEY_13: SwitchPanel(1); break; case JoystickManager.BLANKET_NUMBER_KEY.KEY_6: curPanel.Move(0, -1); break; case JoystickManager.BLANKET_NUMBER_KEY.KEY_10: curPanel.Move(0, 1); break; case JoystickManager.BLANKET_NUMBER_KEY.KEY_11: curPanel.Enter(); break; case JoystickManager.BLANKET_NUMBER_KEY.KEY_1: Invoke("Hide", 0.1f); break; } }