unity 2d shooting cooldown
// Very light and easy to use cooldown tool for unity:
// https://github.com/JosepeDev/CooldownAPI
void Shoot()
{
// some shooting behaviour
...
// cooldown activation
shootingCooldown.Activate();
}
if (//if player is pressing the shoot button)
{
// prevent the player from shooting when cooldown active
if (shootingCooldown.IsActive == false)
{
Shoot();
}
}