Week 5: Particle Time


Powerup Particles & Trails

This week saw this addition of particles to indicate when a player has a powerup active. The player now has two trail renderers and two particle systems attached. These are all disabled by default and are then activated and deactivated through script whenever the corresponding powerup is active. A yellow trail appears when speed is activated and a blue one when jump is activated. Both particle systems use custom materials, the strength particle emits small up arrows and the mass particle emits small down arrow.

Fig 1 - Player with particle effects

 Instead of emitting constantly while active the health pack particle emits one time as a burst. It also features a custom material, which makes it emit small plus symbols.

 

Fig 2 - Health pack particle effect

Falling Platform

A new type of platform was also added this week. When the player comes in contact with the platform a timer start before the platform begins flashing. When the flashing finishes the platform will fall away, taking any player standing on it with it. After a short amount of time the platform will reappear and wait to be collided with. All the interactivity is done through script, using OnCollisionEnter2D to start the timer and a coroutine to do the warning flash when the coroutine ends the platform falls away. In the update function a check is done on the location of the platform to know when it falls away, when it does, a call is made to the PlatformManager script which starts a coroutine to wait before it spawns the new platform. When the new platform is spawned it cannot be collided with and instead fades into the scene and then the collider becomes active.

Fig 3 - Player on falling platform

Leave a comment

Log in with itch.io to leave a comment.