Beispiel #1
0
        /// <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;
            }
        }
Beispiel #2
0
        /// <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;
            }
        }
Beispiel #3
0
 /// <summary>
 /// Updates the different managers
 /// </summary>
 public void Update()
 {
     DirectionalLightsManager.Update();
     SpotLightsManager.Update();
     PointLightsManager.Update();
 }
Beispiel #4
0
 /// <summary>
 /// Disposes the different managers
 /// </summary>
 public void Dispose()
 {
     DirectionalLightsManager.Dispose();
     SpotLightsManager.Dispose();
     PointLightsManager.Dispose();
 }
Beispiel #5
0
 /// <summary>
 /// Constructor
 /// </summary>
 public LightsManager()
 {
     DirectionalLightsManager = new DirectionalLightsManager();
     SpotLightsManager        = new SpotLightsManager();
     PointLightsManager       = new PointLightsManager();
 }