if (Input.GetKeyDown(KeyCode.Space))
{
Attack();
}
if (timeBtwAttack <= 0)
{
timeBtwAttack = startTimeBtwAttack;
//нанесение удара
if (Input.GetKeyDown(KeyCode.Space))
{
Attack();
}
}
else
{
timeBtwAttack -= Time.deltaTime;
}