|
DoopelPonger
|
Both the wall and the shield have a shader where if a bullet hits, the color of the bullet is absorbed into the shader. This class manages the colors being absorbed by those materials. More...


Public Member Functions | |
| void | Awake () |
| Initialize references. More... | |
| void | LateUpdate () |
| Send all the data to the shader. More... | |
| void | StartFlash (BallLightInformation lightInfo) |
| Add a color to splash through the material. More... | |
Public Attributes | |
| int | maxNumberOfLights |
Both the wall and the shield have a shader where if a bullet hits, the color of the bullet is absorbed into the shader. This class manages the colors being absorbed by those materials.
When a bullet his the object, the color will start at the point of impact and spread out through the shape and desolve. Since I wanted to release for the web platform I had to make each attribute for the color splashing an array. The alternative would be to have a struct with all the light properties and write that array to the shader with compute buffers.
| void BallColorWaveManager.Awake | ( | ) |
Initialize references.
| void BallColorWaveManager.LateUpdate | ( | ) |
Send all the data to the shader.
| void BallColorWaveManager.StartFlash | ( | BallLightInformation | lightInfo | ) |
Add a color to splash through the material.
| lightInfo | All the data necessary to splash color. |
| int BallColorWaveManager.maxNumberOfLights |
Number of bullets that can add color to the material. At release this is set to 10.
1.8.14