using System; using MaxEffort.Code.Data; namespace MaxEffort.Code.Core; public static class EventBus { public static event Action OnLiftEffortApplied; // Player pressed space public static event Action OnFocusRelease; // Player stopped to look around public static event Action OnFocusChanged; // 0.0 to 1.0 (Tunnel Intensity) public static event Action OnLiftCompleted; // true = Success, false = Fail public static event Action OnLiftProgress; // 0.0 to 1.0 (Lift Progress) public static event Action OnLiftVisualHeight; public static event Action OnCameraTrauma; public static event Action OnHazardSpawned; public static event Action OnHazardResolved; public static void PublishLiftEffortApplied(float strength) => OnLiftEffortApplied?.Invoke(strength); public static void PublishFocusChanged(float intensity) => OnFocusChanged?.Invoke(intensity); public static void PublishLiftCompleted(bool success) => OnLiftCompleted?.Invoke(success); public static void PublishLiftProgress(float progress) => OnLiftProgress?.Invoke(progress); public static void PublishFocusRelease() => OnFocusRelease?.Invoke(); public static void PublishHazardSpawned(HazardType type) => OnHazardSpawned?.Invoke(type); public static void PublishHazardResolved(HazardType type) => OnHazardResolved?.Invoke(type); public static void PublishLiftVisualHeight(float height) => OnLiftVisualHeight?.Invoke(height); public static void PublishCameraTrauma(float trauma) => OnCameraTrauma?.Invoke(trauma); }