mirror of
https://github.com/ppy/osu
synced 2024-12-25 00:02:48 +00:00
Add xmldocs
This commit is contained in:
parent
eba6371526
commit
e0c1072ab2
@ -27,7 +27,7 @@ namespace osu.Game.Rulesets.Taiko.Scoring
|
||||
private double hpMissMultiplier;
|
||||
|
||||
public TaikoHealthProcessor(double gameplayStartTime)
|
||||
: base(gameplayStartTime)
|
||||
: base(gameplayStartTime, 0.5)
|
||||
{
|
||||
}
|
||||
|
||||
@ -42,6 +42,5 @@ namespace osu.Game.Rulesets.Taiko.Scoring
|
||||
protected override double GetHealthIncreaseFor(JudgementResult result)
|
||||
=> base.GetHealthIncreaseFor(result) * (result.Type == HitResult.Miss ? hpMissMultiplier : hpMultiplier);
|
||||
|
||||
protected override bool DefaultFailCondition => JudgedHits == MaxHits && Health.Value <= 0.5;
|
||||
}
|
||||
}
|
||||
|
@ -3,11 +3,25 @@
|
||||
|
||||
namespace osu.Game.Rulesets.Scoring
|
||||
{
|
||||
/// <summary>
|
||||
/// A <see cref="HealthProcessor"/> that accumulates health and causes a fail if the final health
|
||||
/// is less than a value required to pass the beatmap.
|
||||
/// </summary>
|
||||
public class AccumulatingHealthProcessor : HealthProcessor
|
||||
{
|
||||
public AccumulatingHealthProcessor(double gameplayStartTime)
|
||||
protected override bool DefaultFailCondition => JudgedHits == MaxHits && Health.Value < requiredHealth;
|
||||
|
||||
private readonly double requiredHealth;
|
||||
|
||||
/// <summary>
|
||||
/// Creates a new <see cref="AccumulatingHealthProcessor"/>.
|
||||
/// </summary>
|
||||
/// <param name="gameplayStartTime">The gameplay start time.</param>
|
||||
/// <param name="requiredHealth">The minimum amount of health required to beatmap.</param>
|
||||
public AccumulatingHealthProcessor(double gameplayStartTime, double requiredHealth)
|
||||
: base(gameplayStartTime)
|
||||
{
|
||||
this.requiredHealth = requiredHealth;
|
||||
}
|
||||
|
||||
protected override void Reset(bool storeResults)
|
||||
|
@ -9,6 +9,9 @@ using osu.Game.Rulesets.Objects;
|
||||
|
||||
namespace osu.Game.Rulesets.Scoring
|
||||
{
|
||||
/// <summary>
|
||||
/// A <see cref="HealthProcessor"/> which continuously drains health.
|
||||
/// </summary>
|
||||
public class DrainingHealthProcessor : HealthProcessor
|
||||
{
|
||||
private IBeatmap beatmap;
|
||||
@ -17,6 +20,10 @@ namespace osu.Game.Rulesets.Scoring
|
||||
private double targetMinimumHealth;
|
||||
private double drainRate = 1;
|
||||
|
||||
/// <summary>
|
||||
/// Creates a new <see cref="DrainingHealthProcessor"/>.
|
||||
/// </summary>
|
||||
/// <param name="gameplayStartTime">The gameplay start time.</param>
|
||||
public DrainingHealthProcessor(double gameplayStartTime)
|
||||
: base(gameplayStartTime)
|
||||
{
|
||||
|
@ -41,6 +41,10 @@ namespace osu.Game.Rulesets.Scoring
|
||||
/// </summary>
|
||||
protected readonly double GameplayStartTime;
|
||||
|
||||
/// <summary>
|
||||
/// Creates a new <see cref="HealthProcessor"/>.
|
||||
/// </summary>
|
||||
/// <param name="gameplayStartTime">The gameplay start time.</param>
|
||||
protected HealthProcessor(double gameplayStartTime)
|
||||
{
|
||||
GameplayStartTime = gameplayStartTime;
|
||||
@ -70,6 +74,11 @@ namespace osu.Game.Rulesets.Scoring
|
||||
// Todo: Revert HasFailed state with proper player support
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Retrieves the health increase for a <see cref="JudgementResult"/>.
|
||||
/// </summary>
|
||||
/// <param name="result">The <see cref="JudgementResult"/>.</param>
|
||||
/// <returns>The health increase.</returns>
|
||||
protected virtual double GetHealthIncreaseFor(JudgementResult result) => result.Judgement.HealthIncreaseFor(result);
|
||||
|
||||
/// <summary>
|
||||
|
Loading…
Reference in New Issue
Block a user