private void inputManager(int iInput) { switch (iInput) { case 1: { if (lLeg.bGrounded) { rb.AddForce(transform.up * lLeg.fJumpSpeed); } else if (!lLeg.bGrounded && lLeg.iJumps > 0) { StartCoroutine(Dash(lLeg.fDashTime)); rb.AddForce(new Vector3(KeyAxisH, KeyAxisV, 0) * lLeg.fJumpSpeed); --lLeg.iJumps; } break; } case 2: { gGun.Shoot(); break; } case 3: { bBody.Explode(); bDisabled = true; break; } } }
private void inputManager(int iInput) { switch (iInput) { case 1: { if (bBody.bGrounded) { //bBody.rb.AddForce(transform.up * bBody.fJumpSpeed); bBody.rb.velocity = new Vector3(0, bBody.fJumpSpeed, 0); } else if (!bBody.bGrounded && bBody.iJumps > 0) { StartCoroutine(Dash(bBody.fDashTime)); //bBody.rb.AddForce(new Vector3(KeyAxisH, KeyAxisV, 0) * bBody.fJumpSpeed); bBody.rb.velocity = new Vector3(KeyAxisH, KeyAxisV, 0) * bBody.fJumpSpeed; --bBody.iJumps; } break; } case 2: { gGun.Shoot(); break; } case 3: { sSword.Stab(); break; } case 4: { bBody.Explode(); //bDisabled = true; break; } } }