/// <summary> /// Registers an AuraLight onto the correct manager /// </summary> /// <param name="light">The candidate light</param> public void Register(AuraLight light, bool castShadows, bool castCookie) { switch (light.Type) { case LightType.Directional: { DirectionalLightsManager.Register(light, castShadows, castCookie); } break; case LightType.Spot: { SpotLightsManager.Register(light, castShadows, castCookie); } break; case LightType.Point: { PointLightsManager.Register(light, castShadows, castCookie); } break; } }
/// <summary> /// Unregisters an AuraLight from the correct manager /// </summary> /// <param name="light">The candidate light</param> public void Unregister(AuraLight light) { switch (light.Type) { case LightType.Directional: { DirectionalLightsManager.Unregister(light); } break; case LightType.Spot: { SpotLightsManager.Unregister(light); } break; case LightType.Point: { PointLightsManager.Unregister(light); } break; } }
/// <summary> /// Updates the different managers /// </summary> public void Update() { DirectionalLightsManager.Update(); SpotLightsManager.Update(); PointLightsManager.Update(); }
/// <summary> /// Disposes the different managers /// </summary> public void Dispose() { DirectionalLightsManager.Dispose(); SpotLightsManager.Dispose(); PointLightsManager.Dispose(); }
/// <summary> /// Constructor /// </summary> public LightsManager() { DirectionalLightsManager = new DirectionalLightsManager(); SpotLightsManager = new SpotLightsManager(); PointLightsManager = new PointLightsManager(); }