If you want the player to only be able to do an action at a maximum pace you will need to implement a cooldown system. Luckily, in Unity this is very easy to do.

To setup a cooldown system you only need two variables. One variable for the length of the cooldown and one to keep track of the current time of cooldown.

Below I have applied it to the space shooter from my previous articles. Time.time is the length of time since the game started. When you start the game this will be higher than the current time of cooldown and the player can shoot straight away:

To reset the cooldown all you need to do is set it to the time since the game first started and the length of the cooldown. The player will now only be able to fire once Time.time is higher than the cooldown timer:

Good luck!

Unity / C# Game developer