SunShadowCastComponent.cs 749 B

12345678910111213141516171819202122232425
  1. using System.Numerics;
  2. using Robust.Shared.GameStates;
  3. using Robust.Shared.Physics;
  4. namespace Content.Shared.Light.Components;
  5. /// <summary>
  6. /// Treats this entity as a 1x1 tile and extrapolates its position along the <see cref="SunShadowComponent"/> direction.
  7. /// </summary>
  8. [RegisterComponent, NetworkedComponent]
  9. public sealed partial class SunShadowCastComponent : Component
  10. {
  11. /// <summary>
  12. /// Points that will be extruded to draw the shadow color.
  13. /// Max <see cref="PhysicsConstants.MaxPolygonVertices"/>
  14. /// </summary>
  15. [DataField]
  16. public Vector2[] Points = new[]
  17. {
  18. new Vector2(-0.5f, -0.5f),
  19. new Vector2(0.5f, -0.5f),
  20. new Vector2(0.5f, 0.5f),
  21. new Vector2(-0.5f, 0.5f),
  22. };
  23. }