Beispiel #1
0
    IEnumerator Fire()
    {
        canShoot = false;
        if (ammunitionSlot.GetAmmunitionAmount(ammunitionType) > 0)
        {
            PlayMuzzleFlash();
            ProcessRaycast();
            ammunitionSlot.ExpendAmmunition(ammunitionType);
        }
        yield return(new WaitForSeconds(timeBetweenShots));

        canShoot = true;
    }