An abstract class in Root.Township, Alta.Lighting.
Base for the platform light controllers (PC and Android) that manage the active PlatformLights and tick while any are active.
Constructors
Fields
| Member | What it is |
|---|
protected HashSet<PlatformLight> activeLights | Backing set of active lights. |
1 private and internal field
| Member | What it is |
|---|
private IUnityUpdateMethod update | Registered update method; added when the first light is added and removed when the last one goes. |
Properties
| Member | What it is |
|---|
IEnumerable<PlatformLight> ActiveLights { get; } | The lights currently registered. |
Methods
| Member | What it is |
|---|
virtual void AddLight(PlatformLight light) | Registers a light. The first one starts the update and calls OnEnabled. |
virtual void RemoveLight(PlatformLight light) | Unregisters a light. When none are left it stops the update and calls OnDisabled. |
protected virtual void OnDisabled() | Called when the last light is removed. |
protected virtual void OnEnabled() | Called when the first light is added. |
protected abstract void Update() | Called each frame while there are active lights. |
Used in
Members of other types that take, return or hold a BaseLightsController: