Use a resettable timer. I have a webpage with some timers and other stuff
rate(BOOL) is a good rising edge detector. BOOL is your variable that is true when you fire a weapon when the cannon is selected. To prevent it from being true when reloading, you need another timer
Use a resettable timer. I have a webpage with some timers and other stuff
rate(BOOL) is a good rising edge detector. BOOL is your variable that is true when you fire a weapon when the cannon is selected. To prevent it from being true when reloading, you need another timer