Add MrGameEng.AI utility-AI module; format codebase with CSharpier New MrGameEng.AI module (ResponseCurve, Consideration, UtilityAction, UtilityAi selector, Blackboard) plus CSharpier formatting applied across the whole engine. Documents the CSharpier convention in CLAUDE.md. @
This commit is contained in:
@@ -67,7 +67,12 @@ public sealed class SceneManager
|
||||
break;
|
||||
|
||||
case State.CoveringOut:
|
||||
_coverage = Advance(_coverage, +1f, _transition!.OutDuration, clock.UnscaledDeltaTime);
|
||||
_coverage = Advance(
|
||||
_coverage,
|
||||
+1f,
|
||||
_transition!.OutDuration,
|
||||
clock.UnscaledDeltaTime
|
||||
);
|
||||
if (_coverage >= 1f)
|
||||
{
|
||||
ApplyPending();
|
||||
@@ -77,7 +82,12 @@ public sealed class SceneManager
|
||||
break;
|
||||
|
||||
case State.RevealingIn:
|
||||
_coverage = Advance(_coverage, -1f, _transition!.InDuration, clock.UnscaledDeltaTime);
|
||||
_coverage = Advance(
|
||||
_coverage,
|
||||
-1f,
|
||||
_transition!.InDuration,
|
||||
clock.UnscaledDeltaTime
|
||||
);
|
||||
if (_coverage <= 0f)
|
||||
{
|
||||
_state = State.Idle;
|
||||
@@ -127,7 +137,12 @@ public sealed class SceneManager
|
||||
Log.Info($"Scene switched to {Current?.GetType().Name ?? "<none>"}");
|
||||
}
|
||||
|
||||
private static float Advance(float coverage, float direction, float duration, float deltaTime) =>
|
||||
private static float Advance(
|
||||
float coverage,
|
||||
float direction,
|
||||
float duration,
|
||||
float deltaTime
|
||||
) =>
|
||||
duration <= 0f
|
||||
? coverage + direction
|
||||
: Math.Clamp(coverage + direction * deltaTime / duration, 0f, 1f);
|
||||
|
||||
Reference in New Issue
Block a user