mirror of
https://github.com/ppy/osu
synced 2025-02-28 08:31:18 +00:00
CI fixes.
This commit is contained in:
parent
d9dec9d444
commit
47cd91fa63
@ -27,14 +27,14 @@ namespace osu.Game.Rulesets.Taiko.Objects
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
internal double Strain = 1;
|
internal double Strain = 1;
|
||||||
|
|
||||||
private double timeElapsed = 0;
|
private double timeElapsed;
|
||||||
private int sameTypeSince = 1;
|
private int sameTypeSince = 1;
|
||||||
|
|
||||||
private bool isRim => BaseHitObject is RimHit;
|
private bool isRim => BaseHitObject is RimHit;
|
||||||
|
|
||||||
public TaikoHitObjectDifficulty(TaikoHitObject baseHitObject)
|
public TaikoHitObjectDifficulty(TaikoHitObject baseHitObject)
|
||||||
{
|
{
|
||||||
this.BaseHitObject = baseHitObject;
|
BaseHitObject = baseHitObject;
|
||||||
}
|
}
|
||||||
|
|
||||||
internal void CalculateStrains(TaikoHitObjectDifficulty previousHitObject, double timeRate)
|
internal void CalculateStrains(TaikoHitObjectDifficulty previousHitObject, double timeRate)
|
||||||
|
@ -30,7 +30,7 @@ namespace osu.Game.Rulesets.Taiko
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// HitObjects are stored as a member variable.
|
/// HitObjects are stored as a member variable.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
private List<TaikoHitObjectDifficulty> difficultyHitObjects = new List<TaikoHitObjectDifficulty>();
|
private readonly List<TaikoHitObjectDifficulty> difficultyHitObjects = new List<TaikoHitObjectDifficulty>();
|
||||||
|
|
||||||
public TaikoDifficultyCalculator(Beatmap beatmap)
|
public TaikoDifficultyCalculator(Beatmap beatmap)
|
||||||
: base(beatmap)
|
: base(beatmap)
|
||||||
@ -64,23 +64,23 @@ namespace osu.Game.Rulesets.Taiko
|
|||||||
private bool calculateStrainValues()
|
private bool calculateStrainValues()
|
||||||
{
|
{
|
||||||
// Traverse hitObjects in pairs to calculate the strain value of NextHitObject from the strain value of CurrentHitObject and environment.
|
// Traverse hitObjects in pairs to calculate the strain value of NextHitObject from the strain value of CurrentHitObject and environment.
|
||||||
List<TaikoHitObjectDifficulty>.Enumerator hitObjectsEnumerator = difficultyHitObjects.GetEnumerator();
|
using (List<TaikoHitObjectDifficulty>.Enumerator hitObjectsEnumerator = difficultyHitObjects.GetEnumerator())
|
||||||
|
{
|
||||||
if (!hitObjectsEnumerator.MoveNext()) return false;
|
if (!hitObjectsEnumerator.MoveNext()) return false;
|
||||||
|
|
||||||
TaikoHitObjectDifficulty currentHitObject = hitObjectsEnumerator.Current;
|
TaikoHitObjectDifficulty current = hitObjectsEnumerator.Current;
|
||||||
TaikoHitObjectDifficulty nextHitObject;
|
|
||||||
|
|
||||||
// First hitObject starts at strain 1. 1 is the default for strain values, so we don't need to set it here. See DifficultyHitObject.
|
// First hitObject starts at strain 1. 1 is the default for strain values, so we don't need to set it here. See DifficultyHitObject.
|
||||||
while (hitObjectsEnumerator.MoveNext())
|
while (hitObjectsEnumerator.MoveNext())
|
||||||
{
|
{
|
||||||
nextHitObject = hitObjectsEnumerator.Current;
|
var next = hitObjectsEnumerator.Current;
|
||||||
nextHitObject.CalculateStrains(currentHitObject, TimeRate);
|
next?.CalculateStrains(current, TimeRate);
|
||||||
currentHitObject = nextHitObject;
|
current = next;
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private double calculateDifficulty()
|
private double calculateDifficulty()
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user