void FixedUpdate()
    {
        // Move the character
        controller.move(horizontalMove, jump);

        if (shoot == true)
        {
            //controller.shoot(shoot);
        }
        //Debug.Log(horizontalMove);
    }
Example #2
0
    void FixedUpdate()
    {
        // Move the character
        controller.move(horizontalMove, jump, upPress, downShot);

        if (fire)
        {
            if (chargedCur >= chargedDelay)
            {
                chargedShot = true;
            }


            if (shoot)
            {
                controller.shoot(upPress, downShot, chargedShot);
                chargedCur  = 0;
                chargedShot = false;
                StartCoroutine(fireRate());
            }
        }
    }