1
0
mirror of https://github.com/ppy/osu.git synced 2026-05-28 02:25:29 +08:00

Rename method + add xmldoc

This commit is contained in:
smoogipoo
2019-04-22 18:08:15 +09:00
Unverified
parent 910b9df2d5
commit aeae759fcd
5 changed files with 11 additions and 6 deletions
@@ -26,7 +26,7 @@ namespace osu.Game.Rulesets.Catch.Scoring
hpDrainRate = beatmap.BeatmapInfo.BaseDifficulty.DrainRate;
}
protected override double HpFactorFor(JudgementResult result)
protected override double HealthAdjustmentFactorFor(JudgementResult result)
{
switch (result.Type)
{
@@ -82,7 +82,7 @@ namespace osu.Game.Rulesets.Mania.Scoring
}
}
protected override double HpFactorFor(JudgementResult result)
protected override double HealthAdjustmentFactorFor(JudgementResult result)
=> result.Type == HitResult.Miss ? hpMissMultiplier : hpMultiplier;
public override HitWindows CreateHitWindows() => new ManiaHitWindows();
@@ -47,7 +47,7 @@ namespace osu.Game.Rulesets.Osu.Scoring
comboResultCounts[osuResult.ComboType] = comboResultCounts.GetOrDefault(osuResult.ComboType) + 1;
}
protected override double HpFactorFor(JudgementResult result)
protected override double HealthAdjustmentFactorFor(JudgementResult result)
{
switch (result.Type)
{
@@ -46,7 +46,7 @@ namespace osu.Game.Rulesets.Taiko.Scoring
hpMissMultiplier = BeatmapDifficulty.DifficultyRange(beatmap.BeatmapInfo.BaseDifficulty.DrainRate, 0.0018, 0.0075, 0.0120);
}
protected override double HpFactorFor(JudgementResult result)
protected override double HealthAdjustmentFactorFor(JudgementResult result)
=> result.Type == HitResult.Miss ? hpMissMultiplier : hpMultiplier;
protected override void Reset(bool storeResults)
+7 -2
View File
@@ -334,7 +334,7 @@ namespace osu.Game.Rulesets.Scoring
rollingMaxBaseScore += result.Judgement.MaxNumericResult;
}
Health.Value += HpFactorFor(result) * result.Judgement.HealthIncreaseFor(result);
Health.Value += HealthAdjustmentFactorFor(result) * result.Judgement.HealthIncreaseFor(result);
}
/// <summary>
@@ -362,7 +362,12 @@ namespace osu.Game.Rulesets.Scoring
}
}
protected virtual double HpFactorFor(JudgementResult result) => 1;
/// <summary>
/// An adjustment factor which is multiplied into the health increase provided by a <see cref="JudgementResult"/>.
/// </summary>
/// <param name="result">The <see cref="JudgementResult"/> for which the adjustment should apply.</param>
/// <returns>The adjustment factor.</returns>
protected virtual double HealthAdjustmentFactorFor(JudgementResult result) => 1;
private void updateScore()
{