private void Update() { if (CheckTouch()) { if (bullets >= infoWeapon.costByBullet.GetValue(infoWeapon.level) && currentTime < Time.time) { pipe.Shoot(this); bullets -= (int)infoWeapon.costByBullet.GetValue(infoWeapon.level); currentTime = Time.time + infoWeapon.coolDown.GetValue(infoWeapon.level); } } UpdateAmmoUI(); }