A small static UI event bus for ping markers. It defines a PingType enum, an OnPing event, and a Post method that invokes the event with a world position and type.
using System;
using Sandbox;
namespace BrickJam.UI;
/// <summary>Decouples gameplay from the Razor <c>QuickPing</c> panel (see <see cref="EventlogBus"/>).</summary>
public static class PingBus
{
public enum PingType { Enemy, Exit, Loot, Other }
public static event Action<Vector3, PingType> OnPing;
public static void Post( Vector3 worldPosition, PingType type ) => OnPing?.Invoke( worldPosition, type );
}