void OnInputCancel(InputManager.Info data) { if (data.state == InputManager.State.Pressed && UICamera.selectedObject != null) { UICamera.Notify(UICamera.selectedObject, "OnKey", KeyCode.Escape); } }
void OnInputEscape(InputManager.Info data) { if (data.state == InputManager.State.Pressed) { Execute(); } }
void OnEsc(InputManager.Info dat) { if (dat.state == InputManager.State.Pressed) { UIModalManager.instance.ModalOpen("menu"); } }
void OnInputEscape(InputManager.Info data) { if (data.state == InputManager.State.Pressed) { Manager.instance.ModalCloseTop(); } }
void OnInput(InputManager.Info dat) { if (dat.state == InputManager.State.Pressed) { StartGame(); } }
void OnInputEscape(InputManager.Info dat) { if (dat.state == InputManager.State.Pressed) { Main.instance.sceneManager.LoadScene(Scenes.main); } }
void OnInput(InputManager.Info dat) { if (dat.state == InputManager.State.Pressed) { Action(-1); } }
void OnInputOptions(InputManager.Info dat) { if (dat.state == InputManager.State.Pressed) { UIModalManager.instance.ModalOpen("options"); } }
void OnInputEnter(InputManager.Info data) { if (data.state == InputManager.State.Pressed && (!checkSelected || UICamera.selectedObject == gameObject)) { UICamera.Notify(gameObject, "OnClick", null); } }
void OnEnter(InputManager.Info dat) { if (dat.state == InputManager.State.Released && mMoveState == MoveState.None && LevelManager.instance.curStageData.unlocked) { UIModalManager.instance.ModalOpen("levelSelect"); } }
void OnInputPause(InputManager.Info dat) { if (dat.state == InputManager.State.Pressed) { if (!UIModalManager.instance.ModalIsInStack("pause")) { UIModalManager.instance.ModalOpen("pause"); } } }
void OnInput(InputManager.Info data) { if (data.state == InputManager.State.Pressed) { Fsm.Event(onPressEvent); } else if (data.state == InputManager.State.Released) { Fsm.Event(onReleaseEvent); } }
void OnInputJump(InputManager.Info dat) { if (dat.state == InputManager.State.Pressed) { mCtrl.Jump(true); } else if (dat.state == InputManager.State.Released) { mCtrl.Jump(false); } }
void OnInputEscape(InputManager.Info data) { if (mInputLockCounter > 0) { return; } if (data.state == InputManager.State.Pressed) { UIModalManager.instance.ModalCloseTop(); } }
void OnInputInfo(InputManager.Info dat) { if (mLockInput) { return; } if (dat.state == InputManager.State.Pressed) { infoActiveGO.SetActive(!infoActiveGO.activeSelf); } }
void OnInputSpecial(InputManager.Info dat) { /*if(dat.state == InputManager.State.Pressed) { * if(bombGrabber.grabState == BombGrabber.GrabState.None) { * int mode = (int)(bombGrabber.mode + 1); * if(mode >= (int)BombGrabber.Mode.NumModes) * mode = 0; * * bombGrabber.mode = (BombGrabber.Mode)mode; * } * }*/ }
void OnInput(InputManager.Info dat) { if (!mInputLock) { if (dat.state == InputManager.State.Pressed) { UIModalManager.instance.ModalCloseAll(); //go to stage Main.instance.sceneManager.LoadScene(stages[mCurStage].level); } } }
void OnInputPause(InputManager.Info dat) { if (dat.state == InputManager.State.Pressed) { if (state != (int)EntityState.Dead && state != (int)EntityState.Victory && state != (int)EntityState.Final) { if (UIModalManager.instance.activeCount == 0 && !UIModalManager.instance.ModalIsInStack("pause")) { UIModalManager.instance.ModalOpen("pause"); } } } }
void OnInputSlide(InputManager.Info dat) { if (dat.state == InputManager.State.Pressed) { if (!mSliding) { Weapon curWpn = weapons[mCurWeaponInd]; if ((!curWpn.isFireActive || curWpn.allowSlide) && mCtrl.isGrounded) { SetSlide(true); } } } }
void OnInput(InputManager.Info dat) { if (dat.state == InputManager.State.Pressed) { SetInput(false); if (!FsmEvent.IsNullOrEmpty(toEvent)) { Fsm.Event(toEvent); } Finish(); } }
void OnInputJump(InputManager.Info dat) { if (dat.state == InputManager.State.Pressed) { InputManager input = Main.instance.input; Weapon curWpn = currentWeapon; if (curWpn == null || curWpn.Jump(this) == false) { if (!mSliding) { if (input.GetAxis(0, InputAction.MoveY) < -0.1f && mCtrl.isGrounded) { if (!curWpn.isFireActive || curWpn.allowSlide) { SetSlide(true); } } else { mCtrl.Jump(true); if (mCtrl.isJumpWall) { Vector2 p = mCtrlSpr.wallStickParticle.transform.position; PoolController.Spawn("fxp", "wallSpark", "wallSpark", null, p); sfxWallJump.Play(); } } } else { if (input.GetAxis(0, InputAction.MoveY) >= 0.0f) { //if we can stop sliding, then jump SetSlide(false, false); if (!mSliding) { mCtrl.Jump(true); } } } } } else if (dat.state == InputManager.State.Released) { mCtrl.Jump(false); } }
void OnInputJump(InputManager.Info dat) { if (!enabled) { return; } if (dat.state == InputManager.State.Pressed) { Jump(true); } else { Jump(false); } }
void OnInput(InputManager.Info dat) { if (!UIModalManager.instance.ModalIsInStack(UIModalConfirm.modalName)) { if (dat.state == InputManager.State.Pressed) { UIModalConfirm.Open(GameLocalize.GetText("skip_confirm_title"), GameLocalize.GetText("skip_confirm_desc"), delegate(bool yes) { if (yes) { Main.instance.input.RemoveButtonCall(0, InputAction.MenuEscape, OnInput); Player.instance.state = (int)EntityState.Final; } }); } } }
void OnInputPowerPrev(InputManager.Info dat) { if (dat.state == InputManager.State.Pressed) { for (int i = 0, max = weapons.Length, toWeaponInd = currentWeaponIndex - 1; i < max; i++, toWeaponInd--) { if (toWeaponInd < 0) { toWeaponInd = weapons.Length - 1; } if (weapons[toWeaponInd] && Weapon.IsAvailable(toWeaponInd)) { currentWeaponIndex = toWeaponInd; break; } } } }
void OnInputPowerNext(InputManager.Info dat) { if (dat.state == InputManager.State.Pressed) { for (int i = 0, max = weapons.Length, toWeaponInd = currentWeaponIndex + 1; i < max; i++, toWeaponInd++) { if (toWeaponInd >= weapons.Length) { toWeaponInd = 0; } if (weapons[toWeaponInd] && SlotInfo.WeaponIsUnlock(toWeaponInd)) { currentWeaponIndex = toWeaponInd; break; } } } }
//input void OnInputFire(InputManager.Info dat) { if (dat.state == InputManager.State.Pressed) { if (currentWeapon) { if (currentWeapon.allowSlide || !mSliding) { currentWeapon.FireStart(); } } } else if (dat.state == InputManager.State.Released) { if (currentWeapon) { currentWeapon.FireStop(); } } }
void OnInput(InputManager.Info dat) { if (!UIModalManager.instance.ModalIsInStack(UIModalConfirm.modalName)) { if (dat.state == InputManager.State.Pressed) { UIModalConfirm.Open(GameLocalize.GetText("skip_confirm_title"), GameLocalize.GetText("skip_confirm_desc"), delegate(bool yes) { if (yes) { for (int i = 0; i < InputAction._count; i++) { Main.instance.input.RemoveButtonCall(0, i, OnInput); } Main.instance.sceneManager.LoadScene(toScene); } }); } } }
void OnInputAction(InputManager.Info dat) { if (dat.state == InputManager.State.Pressed) { if (hasAttach) { if (!attachAnimator.isPlaying) { attachAnimator.Play(mBodySpriteCtrl.isLeft ? "throwLeft" : "throw"); } ThrowAttach(); } else if (bombGrabber.canGrab) { bombGrabber.Grab(); } else if (bombGrabber.grabState != BombGrabber.GrabState.None) { bombGrabber.Revert(); } } }
void OnInputEnter(InputManager.Info data) { bool pressed = data.state == InputManager.State.Pressed; bool released = data.state == InputManager.State.Released; if (pressed || released) { UICamera.currentTouchID = -666; UICamera.currentTouch = mController; UICamera.currentTouch.current = UICamera.selectedObject; UICamera.eventHandler.ProcessTouch(pressed, released); UICamera.currentTouch.current = null; UICamera.currentTouch = null; } //UICamera.current //mController /* if(data.state == InputManager.State.Pressed && UICamera.selectedObject != null) { * UICamera.Notify(UICamera.selectedObject, "OnClick", null); * }*/ }
void OnInputJump(InputManager.Info dat) { if (dat.state == InputManager.State.Pressed) { if (!mSliding) { InputManager input = Main.instance.input; if (input.GetAxis(0, InputAction.MoveY) < -0.1f && mCtrl.isGrounded) { Weapon curWpn = weapons[mCurWeaponInd]; if (!curWpn.isFireActive || curWpn.allowSlide) { SetSlide(true); } } else { mCtrl.Jump(true); } } else { //if we can stop sliding, then jump SetSlide(false, false); if (!mSliding) { mCtrl.Jump(true); } } } else if (dat.state == InputManager.State.Released) { mCtrl.Jump(false); } }