* Flash component, overlay and shader Add BeginDraw method to Overlay.cs * Add flash icons, sounds * Progress * Multiple overlays without enums * This is probably the worst way to do this IDK * Remove nullable reference type * Add AttackEventArgs as parameter to OnHitEntities MeleeWeaponComponent.Attack now continues when OnHitEntities returns true (it hit something) Add OverlayType enum so client and server can agree on overlay ids Move IConfigurable to its own file Add AoE flash with shorter duration Flashing someone slows them down * Add arc to flash Set item size to something reasonable Remove chat log message when flash burns out * Remove unused interface
34 lines
1.2 KiB
C#
34 lines
1.2 KiB
C#
using Content.Shared.GameObjects.Components.Mobs;
|
|
using Robust.Client.Graphics.Drawing;
|
|
using Robust.Client.Graphics.Overlays;
|
|
using Robust.Client.Graphics.Shaders;
|
|
using Robust.Client.Interfaces.Graphics.ClientEye;
|
|
using Robust.Shared.IoC;
|
|
using Robust.Shared.Maths;
|
|
using Robust.Shared.Prototypes;
|
|
|
|
namespace Content.Client.Graphics.Overlays
|
|
{
|
|
public class GradientCircleMaskOverlay : Overlay
|
|
{
|
|
#pragma warning disable 649
|
|
[Dependency] private readonly IPrototypeManager _prototypeManager;
|
|
[Dependency] private readonly IEyeManager _eyeManager;
|
|
#pragma warning restore 649
|
|
public override OverlaySpace Space => OverlaySpace.WorldSpace;
|
|
|
|
public GradientCircleMaskOverlay() : base(nameof(OverlayType.GradientCircleMaskOverlay))
|
|
{
|
|
IoCManager.InjectDependencies(this);
|
|
Shader = _prototypeManager.Index<ShaderPrototype>("GradientCircleMask").Instance();
|
|
}
|
|
|
|
protected override void Draw(DrawingHandleBase handle)
|
|
{
|
|
var worldHandle = (DrawingHandleWorld)handle;
|
|
var viewport = _eyeManager.GetWorldViewport();
|
|
worldHandle.DrawRect(viewport, Color.White);
|
|
}
|
|
}
|
|
}
|