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