Снова всем привет! Вы наверное встречали в большинстве шутеров дробовик, а конкретно его особенность в том что можно стрелять не доперезаредив оружие. То есть можно в оружие засунуть один патрон и стрелять. Так вот. Хотел бы у Вас поинтересоваться как переделать мой скрипт чтобы такое реализовать? Вот скрипт:
public IEnumerator CoroutineShootGunReload(){
reload = false;
anim.PlayQueued(ShootGunAnimations.start_reload.name);
yield return new WaitForSeconds(ShootGunAnimations.start_reload.length);
for(int i = 0; i < WeaponParameters.maxAmmoInClip; i++)
{
anim.PlayQueued(ShootGunAnimations.insert_reload.name);
yield return new WaitForSeconds(ShootGunAnimations.insert_reload.length);
gunAmmo++;
WeaponParameters.maxAmmo--;
}
anim.PlayQueued(ShootGunAnimations.after_reload.name);
yield return new WaitForSeconds(ShootGunAnimations.after_reload.length + 0.5f);
canShoot = true;
reload = true;
}