Creating Modular Powerup Systems

  • Each powerup is a prefab, a GameObject
  • The behaviour of each powerup can be set using a switch statement in OnTriggerEnter function
  • In the script, we create an array of type GameObject to include all the powerups
  • The powerups must be assigned in the Editor
  • For instantiating powerups randomly, Random.Range can be used

--

--

--

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

GitHub Actions: powering up your existing repos with build capabilities

Best Dev Tools for a Beginner Software Developer

Takeover The Cordova Facebook Plugin Maintenance

How to Execute Raw SQL Queries on Multiple Databases in Django

Deploying symfony 4 application to shared hosting with just FTP access

MVC, What Is It?

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
Hernando Nieto Jaramillo

Hernando Nieto Jaramillo

Unity developer

More from Medium

Using Bionic Clothing to Improve Foot Drop

The case for change: why we need a fund dedicated to underrepresented founders

Mona and Shaz look over notes together in a catering store room. They wear black hairnets and black chef jackets.

My topic for the class is herd mentality.

Deconstruction & the Search for Brother Noah