A small static event bus that decouples gameplay code from a Razor UI black-screen fade panel. It defines a single event OnTrigger with three float parameters and a Trigger method that invokes the event if any listeners are present.
using System;
namespace BrickJam.UI;
/// <summary>Decouples gameplay from the Razor <c>BlackScreen</c> fade panel (see <see cref="EventlogBus"/>).</summary>
public static class BlackScreenBus
{
public static event Action<float, float, float> OnTrigger;
public static void Trigger( float blackDuration, float startTransition, float endTransition )
=> OnTrigger?.Invoke( blackDuration, startTransition, endTransition );
}