Determining How Long Powerup Effects Should Last

When adding power ups to our game it would make sense to add a timer to how long they last for. This can be done through a Co routine.

The player collides with power up and on collision the power up is destroyed to give the effect of collection.

The player script has a method to activate an IEnumerator to start a count down of 5 seconds and activate the triple shot

we set the triple shot to false by default in a variable at the start of the script



Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store