I'd like to add a cooldown system, wherein players can only fire every 3 seconds. My question is how to take advantage of the groups and events I already made. Whereas the health drops in increments (10 per enemy attack/collision), I'd like the second bar to show the max cooldown period (as in, the bar is filled), reduce it to 0 when the gun is fired, then climb back to the top every second as the gun cools off and returns to its original value.
While there are several ways to do cooldown (I've been testing two recently), I'm really not sure how to adapt them to my project. A simple one would be:
Though whether with this or a different one, I wouldn't know where to begin (other than start by writing them).