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

View File

@@ -0,0 +1,38 @@
using Godot;
using MaxEffort.Code.Core;
namespace MaxEffort.Code.Systems;
[GlobalClass]
public partial class BenchPressSystem : BaseLiftSystem
{
protected override void HandleEffort(float effortDelta)
{
CurrentProgress += PowerPerClick * effortDelta;
CheckWin();
}
public override void _Process(double delta)
{
if (IsLiftComplete) return;
if (CurrentProgress > 0)
{
CurrentProgress -= Gravity * (float)delta;
CurrentProgress = Mathf.Max(0, CurrentProgress);
}
var ratio = CurrentProgress / TargetValue;
EventBus.PublishLiftProgress(ratio);
EventBus.PublishLiftVisualHeight(ratio);
}
private void CheckWin()
{
if (CurrentProgress >= TargetValue)
{
EventBus.PublishLiftCompleted(true);
}
}
}