Journal Entry 5


Date: 31.3.2023

Activity:

  • Added Juiciness to the provided Breakout game:
Was shown on lab:


  • Bricks setup
  • Camera shake
  • Stretchy paddle
  • Ball trail
Was not shown on lab:


  • Bricks color
  • Bricks removement
  • Ball trail changes color on each contact
  • Ball plays sound on contact
  • Particles are emitted on ball contact

Notes:

I am using ParticleSystem.startColor setter for setting color of particles that are emitted on ball contact, it is obsolete though. It says I should use ParticleSystem.main.startColor instead. I have tried that but it does not work because ParticleSystem.main is get only property. Should ParticleSystem.startColor still be used for such cases?

Invested hours:

circa 3 hours all in all

Outcome:

Build (uploaded to the itch.io page as a .zip file)

Files

Breakout.zip 22 MB
Mar 31, 2023

Get Project T

Comments

Log in with itch.io to leave a comment.

Hi, to answer your question, you should first get the main settings from ParticleSystem.main, store it somewhere else and then use it to set the desired values, e.g.:

ParticleSystem.MainModule settings = smokeParticles.main;
settings.startColor = desiredColor;

Unity - Scripting API: ParticleSystem.main (unity3d.com)