Example #1
0
    private void FixedUpdate()
    {
        // Reduce jump timer
        if (f_JumpTimer > 0f)
        {
            f_JumpTimer -= Time.fixedDeltaTime;
            if (f_JumpTimer <= 0f)
            {
                f_JumpTimer = 0f;
            }
        }

        if (WallrunDisabledTimer > 0)
        {
            WallrunDisabledTimer -= Time.fixedDeltaTime;
            if (WallrunDisabledTimer < 0)
            {
                WallrunDisabledTimer = 0f;

                SetWallrunColliderState = true;
            }
        }

        if (!b_IsDead)
        {
            PlayerInput();

            if (playerInput.Trigger_Left == XInputDotNetPure.ButtonState.Pressed && !b_TouchingGround)
            {
                CaptureWallrunColliders();
            }

            // User holds down Left Bumper or 'Y' button
            if (playerInput.Button_Y == XInputDotNetPure.ButtonState.Pressed)
            {
                // print("Weapon Wheel");
            }

            if (playerInput.Button_X == XInputDotNetPure.ButtonState.Pressed && playerInput_Old.Button_X == XInputDotNetPure.ButtonState.Released)
            {
                this_WeaponManager.ReloadGun();
            }

            playerInput_Old = playerInput;

            CameraInput();
        }
    }