Add Overlay.BeforeDraw() (#8905)

This commit is contained in:
Leon Friedrich
2022-06-20 12:16:32 +12:00
committed by GitHub
parent fa4c6f63f8
commit 634dbd53af
2 changed files with 49 additions and 45 deletions

View File

@@ -34,13 +34,14 @@ namespace Content.Client.StationEvents
_baseShader = _prototypeManager.Index<ShaderPrototype>("Radiation").Instance().Duplicate();
}
protected override void Draw(in OverlayDrawArgs args)
protected override bool BeforeDraw(in OverlayDrawArgs args)
{
RadiationQuery(args.Viewport.Eye);
return _pulses.Count > 0;
}
if (_pulses.Count == 0)
return;
protected override void Draw(in OverlayDrawArgs args)
{
if (ScreenTexture == null)
return;