Time for action — changing the color
- Instead of the scaler, add a
ColorFader
affector that subtracts 0.25 of each color channel per second: - Compile and run the application. You should see how the white particles get darker with each second they live.
We added an affector that changes each color channel during the existence of a particle, using the predefined values.
Have a go hero — change the color to red
Change the colorfader code so the particles fade from white to red. The result should look like this:
..................Content has been hidden....................
You can't read the all page of ebook, please click
here login for view all page.