DoopelPonger
Public Member Functions | Public Attributes | List of all members
BallColorWaveManager Class Reference

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...

Inheritance diagram for BallColorWaveManager:
Inheritance graph
[legend]
Collaboration diagram for BallColorWaveManager:
Collaboration graph
[legend]

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
 

Detailed Description

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.

Member Function Documentation

◆ Awake()

void BallColorWaveManager.Awake ( )

Initialize references.

◆ LateUpdate()

void BallColorWaveManager.LateUpdate ( )

Send all the data to the shader.

◆ StartFlash()

void BallColorWaveManager.StartFlash ( BallLightInformation  lightInfo)

Add a color to splash through the material.

Parameters
lightInfoAll the data necessary to splash color.

Member Data Documentation

◆ maxNumberOfLights

int BallColorWaveManager.maxNumberOfLights

Number of bullets that can add color to the material. At release this is set to 10.


The documentation for this class was generated from the following file: