A simple static event bus that decouples gameplay code from a Razor Shop UI panel. It exposes Open and Close methods that invoke OnOpen and OnClose events for subscribers.
using System;
namespace BrickJam.UI;
/// <summary>
/// Decouples gameplay code from the Razor <c>Shop</c> panel (same pattern as <see cref="EventlogBus"/>).
/// The shop usable asks the local client to open/close; the panel subscribes.
/// </summary>
public static class ShopBus
{
public static event Action OnOpen;
public static event Action OnClose;
public static void Open() => OnOpen?.Invoke();
public static void Close() => OnClose?.Invoke();
}