add initial project files and configurations, including EventBus, systems, and resources

This commit is contained in:
2026-01-24 02:47:23 +01:00
commit bba82f64fd
110 changed files with 2735 additions and 0 deletions

30
Code/Core/EventBus.cs Normal file
View File

@@ -0,0 +1,30 @@
using System;
using MaxEffort.Code.Data;
namespace MaxEffort.Code.Core;
public static class EventBus
{
public static event Action<float> OnLiftEffortApplied; // Player pressed space
public static event Action OnFocusRelease; // Player stopped to look around
public static event Action<float> OnFocusChanged; // 0.0 to 1.0 (Tunnel Intensity)
public static event Action<bool> OnLiftCompleted; // true = Success, false = Fail
public static event Action<float> OnLiftProgress; // 0.0 to 1.0 (Lift Progress)
public static event Action<float> OnLiftVisualHeight;
public static event Action<float> OnCameraTrauma;
public static event Action<HazardType> OnHazardSpawned;
public static event Action<HazardType> 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);
}

View File

@@ -0,0 +1 @@
uid://c2v0ppfl3wy8a