Esempio n. 1
0
    void IsShooting()
    {
        //float mouse = Input.GetAxis("Fire1");

        bool isShot = (Input.GetAxis("Fire1") > 0);

        if (isShot && ActiveWeapon.CanShot() && (Ammo[ActiveWeapon.AmmoType] >= ActiveWeapon.AmmoPerShot))
        {
            Ammo[ActiveWeapon.AmmoType] -= ActiveWeapon.AmmoPerShot;
            ActiveWeapon.Shot(shotSpawn);
        }
        else
        {
            return;
        }
    }