void handleJumpInput2() { if (!MyInput.GetJump() || inTrampolinUp) { if (alreadyPressedJump) { alreadyPressedJump = false; } if (rBody.velocity.y > 0f) { rBody.velocity = new Vector2(rBody.velocity.x, rBody.velocity.y * 0.6f); } //jumpFrames = maxJumpFrames + 1; } }
void Update() { // Check jump switch (SM.Instance.state) { case SM.State.Grounded: if (MyInput.GetJump()) { m_applyJump = true; } break; default: break; } }
void handleJumpInput1() { if (!alreadyPressedJump && !inTrampolin && MyInput.GetJump()) { if (grounded /*|| !jumpedTwice*/) { //if (!grounded) { // jumpedTwice = true; // Jump (); //} else { singleStompSource.pitch = 0.8f; singleStompSource.Play(); Jump(); VibrateController.vibrateControllerForXSeconds(0.05f, 0.2f, 0.2f); //anim.SetBool ("Ground", false); //} } else if (CanWallJump && !alreadyWallJumped) { if (huggingFrontWall) { JumpBackward(); alreadyWallJumped = true; } else if (huggingBackWall) { JumpForward(); alreadyWallJumped = true; } else { jumpNext = true; } } } }