private void Update() { timeAttack += Time.deltaTime; if (timeAttack >= currentWeapon.rof) { currentWeapon.OnFire(); timeAttack = 0; } }