mirror of
https://github.com/ppy/osu.git
synced 2025-01-12 17:43:05 +08:00
Extract helper method to reset rhythm strain
This commit is contained in:
parent
80e4c15727
commit
c827e21506
@ -74,8 +74,7 @@ namespace osu.Game.Rulesets.Taiko.Difficulty.Skills
|
|||||||
if (noteLengthMs < 80) return 1;
|
if (noteLengthMs < 80) return 1;
|
||||||
if (noteLengthMs < 210) return Math.Max(0, 1.4 - 0.005 * noteLengthMs);
|
if (noteLengthMs < 210) return Math.Max(0, 1.4 - 0.005 * noteLengthMs);
|
||||||
|
|
||||||
currentStrain = 0.0;
|
resetRhythmStrain();
|
||||||
notesSinceRhythmChange = 0;
|
|
||||||
return 0.0;
|
return 0.0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -83,8 +82,7 @@ namespace osu.Game.Rulesets.Taiko.Difficulty.Skills
|
|||||||
{
|
{
|
||||||
if (!(current.BaseObject is Hit))
|
if (!(current.BaseObject is Hit))
|
||||||
{
|
{
|
||||||
currentStrain = 0.0;
|
resetRhythmStrain();
|
||||||
notesSinceRhythmChange = 0;
|
|
||||||
return 0.0;
|
return 0.0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -109,5 +107,11 @@ namespace osu.Game.Rulesets.Taiko.Difficulty.Skills
|
|||||||
currentStrain += objectStrain;
|
currentStrain += objectStrain;
|
||||||
return currentStrain;
|
return currentStrain;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void resetRhythmStrain()
|
||||||
|
{
|
||||||
|
currentStrain = 0.0;
|
||||||
|
notesSinceRhythmChange = 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user