From 9076c44455632aace7dbd1caf1bb07b737a3f995 Mon Sep 17 00:00:00 2001
From: DavidBeh <67109172+DavidBeh@users.noreply.github.com>
Date: Sun, 1 Dec 2024 01:56:31 +0100
Subject: [PATCH] added documentation
---
osu.Game/Rulesets/Mods/ModHidden.cs | 17 +++++++++++++----
1 file changed, 13 insertions(+), 4 deletions(-)
diff --git a/osu.Game/Rulesets/Mods/ModHidden.cs b/osu.Game/Rulesets/Mods/ModHidden.cs
index f1e14f2b3fc3..c6da3f628c23 100644
--- a/osu.Game/Rulesets/Mods/ModHidden.cs
+++ b/osu.Game/Rulesets/Mods/ModHidden.cs
@@ -97,14 +97,23 @@ void ScoreProcessorOnNewJudgement(JudgementResult judgement, bool revert = false
}
}
- protected float GetAndUpdateDrawableHitObjectComboAlpha(DrawableHitObject dho, bool? hasStarted = null)
+ ///
+ /// Gets the alpha value for a hit object based on the current combo. And stores it internally.
+ /// Hitobjects that have already started will never have this value decreased.
+ ///
+ ///
+ /// An optional to use instead of computing it from drawableHitObject.
+ /// The default can handle objects implementing IHasTimePreempt.
+ ///
+ ///
+ protected float GetAndUpdateDrawableHitObjectComboAlpha(DrawableHitObject drawableHitObject, bool? hasStarted = null)
{
if (EnableAtCombo.Value == 0) return 0;
- HitObject? ho = dho.HitObject;
+ HitObject? ho = drawableHitObject.HitObject;
- hasStarted ??= ho.StartTime - ((ho as IHasTimePreempt)?.TimePreempt ?? 0) < dho.Time.Current;
+ hasStarted ??= ho.StartTime - ((ho as IHasTimePreempt)?.TimePreempt ?? 0) < drawableHitObject.Time.Current;
- if (_opacityTable.TryGetValue(dho.HitObject, out float alpha))
+ if (_opacityTable.TryGetValue(drawableHitObject.HitObject, out float alpha))
{
if (_alpha > alpha || !hasStarted.Value)
{