Controls all the lights (and light effects) within the game. Lights can be disabled/enabled, and also produce a flicker effect.
More...
List of all members.
Public Member Functions |
void | toggleAllLights (bool _areLightsOn) |
| Toggle all the lights either on or off.
|
void | resetLights () |
| Resets all the lights to their original state (the state they were in when the level started). Which in this case is that all the lights are enabled and with a mid-intensity ambient light.
|
IEnumerator | resetLightsWithDelay (float _timeDelay) |
| The time delay it takes before resetting the lights. This is used to set the duration of light events (i.e. the time delay before the light event is killed and the lights are reset).
|
void | setAmbientLighting (Color _color) |
| Sets the ambient lighting within the game.
|
IEnumerator | flickerLights (bool _areLightsFlickering, float _flickerRate) |
| Flickers the lights on and off in succession.
|
Detailed Description
Controls all the lights (and light effects) within the game. Lights can be disabled/enabled, and also produce a flicker effect.
- Author:
- Alexander Poolton
- Version:
- 4.0
- Date:
- 25/7/2011
Member Function Documentation
IEnumerator LightsControl::flickerLights |
( |
bool |
_areLightsFlickering, |
|
|
float |
_flickerRate |
|
) |
| [inline] |
Flickers the lights on and off in succession.
- Parameters:
-
[in] | _areLightsFlickering | A boolean to state whether the lights are flickering or not (starts the while loop if true). |
[in] | _flickerRate | The rate at which the lights flicker. |
- Returns:
- yield The time to delay between flickers (uses the param _flickerRate to set this time delay).
IEnumerator LightsControl::resetLightsWithDelay |
( |
float |
_timeDelay | ) |
[inline] |
The time delay it takes before resetting the lights. This is used to set the duration of light events (i.e. the time delay before the light event is killed and the lights are reset).
- Parameters:
-
[in] | _timeDelay | The time it takes before the lights are reset. |
void LightsControl::setAmbientLighting |
( |
Color |
_color | ) |
[inline] |
Sets the ambient lighting within the game.
- Parameters:
-
[in] | _color | The color of the ambient light. |
void LightsControl::toggleAllLights |
( |
bool |
_areLightsOn | ) |
[inline] |
Toggle all the lights either on or off.
- Parameters:
-
[in] | _areLightsOn | Enable or disable all the lights in the game. |
The documentation for this class was generated from the following file:
- C:/Users/Alex/Desktop/Gamepad Classes/LightsControl.cs