Files
tbd-station-14/Content.Client/GameObjects/EntitySystems/MarkerSystem.cs
metalgearsloth 684ec60be6 Pausing content (#3061)
* Change EntityQuery to not retrieve paused by default

* GetAllComponents

Co-authored-by: Metal Gear Sloth <metalgearsloth@gmail.com>
2021-02-04 00:20:48 +11:00

29 lines
711 B
C#

using Content.Client.GameObjects.Components.Markers;
using Robust.Shared.GameObjects.Systems;
namespace Content.Client.GameObjects.EntitySystems
{
public sealed class MarkerSystem : EntitySystem
{
private bool _markersVisible;
public bool MarkersVisible
{
get => _markersVisible;
set
{
_markersVisible = value;
UpdateMarkers();
}
}
private void UpdateMarkers()
{
foreach (var markerComponent in EntityManager.ComponentManager.EntityQuery<MarkerComponent>(true))
{
markerComponent.UpdateVisibility();
}
}
}
}