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