mirror of
https://github.com/ppy/osu.git
synced 2024-11-11 11:37:28 +08:00
Refactoring
This commit is contained in:
parent
e567e81981
commit
ba539abac7
@ -113,21 +113,23 @@ namespace osu.Game.Rulesets.Taiko.Replays
|
||||
else
|
||||
throw new InvalidOperationException("Unknown hit object type.");
|
||||
|
||||
TaikoHitObject nextHitObject;
|
||||
if (i < Beatmap.HitObjects.Count - 1)
|
||||
{
|
||||
var nextHitObject = Beatmap.HitObjects[i + 1];
|
||||
nextHitObject = Beatmap.HitObjects[i + 1];
|
||||
else
|
||||
nextHitObject = null;
|
||||
|
||||
if (nextHitObject.StartTime > endTime + KEY_UP_DELAY)
|
||||
bool canDelayKeyUp = nextHitObject != null && nextHitObject.StartTime > endTime + KEY_UP_DELAY;
|
||||
|
||||
if (canDelayKeyUp)
|
||||
Frames.Add(new TaikoReplayFrame(endTime + KEY_UP_DELAY));
|
||||
|
||||
if (nextHitObject != null)
|
||||
{
|
||||
double waitTime = nextHitObject.StartTime - 1000;
|
||||
if (waitTime > endTime)
|
||||
Frames.Add(new TaikoReplayFrame(waitTime));
|
||||
}
|
||||
else
|
||||
{
|
||||
Frames.Add(new TaikoReplayFrame(endTime + KEY_UP_DELAY));
|
||||
}
|
||||
|
||||
hitButton = !hitButton;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user