Static event bus for subtitle lines. It defines an OnSubtitle event and a Post method to invoke that event with speaker, text and duration so UI can display voice-line subtitles.
using System;
namespace BrickJam.UI;
/// <summary>Decouples the voice-line runtime from the Razor <c>SubtitlesList</c> panel.</summary>
public static class SubtitleBus
{
public static event Action<string, string, float> OnSubtitle;
public static void Post( string speaker, string text, float duration = 5f ) => OnSubtitle?.Invoke( speaker, text, duration );
}