SunShadowComponent.cs 778 B

12345678910111213141516171819202122232425
  1. using System.Numerics;
  2. using Robust.Shared.GameStates;
  3. namespace Content.Shared.Light.Components;
  4. /// <summary>
  5. /// When added to a map will apply shadows from <see cref="SunShadowComponent"/> to the lighting render target.
  6. /// </summary>
  7. [RegisterComponent, NetworkedComponent, AutoGenerateComponentState]
  8. public sealed partial class SunShadowComponent : Component
  9. {
  10. /// <summary>
  11. /// Maximum length of <see cref="Direction"/>. Mostly used in context of querying for grids off-screen.
  12. /// </summary>
  13. public const float MaxLength = 5f;
  14. /// <summary>
  15. /// Direction for the shadows to be extrapolated in.
  16. /// </summary>
  17. [DataField, AutoNetworkedField]
  18. public Vector2 Direction;
  19. [DataField, AutoNetworkedField]
  20. public float Alpha;
  21. }