Creating Modular Powerup Systems

<p>Generally, video games include more than one powerup in them; and the game I&rsquo;m working on is no exception. When making these, you can create a script for each powerup or we can do something else. Each powerup will be doing the same thing, as far as the behavior is concerned, but will give the Player a different ability once collected. Instead of individual scripts, we can modularize the system. And to help determine which powerup is being represented upon collection, we can use an integer system to designate a number to each powerup.</p> <p>We&rsquo;ll start by creating a new powerup. Go to the sprites folder and select the first sprite of the Speed Powerup and drag it into the Hierarchy.</p> <p><img alt="" src="https://miro.medium.com/v2/resize:fit:567/1*jvoXpdLA_9wUl0hb-S2LrA.gif" style="height:1306px; width:515px" /></p> <p>Rename it to Speed_Powerup and go ahead and adjust the scale the correct size. Then add both the Collider and Rigidbody components, doing any adjustments that are needed. Next we&rsquo;ll add the Powerup script; currently it will only act as the Triple Shot, but we&rsquo;re going to modify it with some code.</p> <p><a href="https://medium.com/@aedric96/creating-modular-powerup-systems-1e8d3d6247c5"><strong>Read More</strong></a></p>