Exemplo n.º 1
0
    void HandleFireButtonPress(InputAction.CallbackContext obj)
    {
        int bulletCount = bulletManager.GetBulletAmount();
        if (bulletCount <= 0)
        {
            //StartCoroutine(bulletManager.ReloadCoroutine()); // RELOAD

            //Debug.Log("Out of Ammo");
            dryFireEvent?.Invoke();

            return;
        }

        bulletManager.DecreaseBullets();

        //Debug.Log(bulletCount);

        FireGun();
    } // end HandleFireButtonPress