1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-13 13:32:54 +08:00

apply code quality fixes

This commit is contained in:
Nitrous 2022-07-28 15:30:45 +08:00
parent bca3994d91
commit 0d36907cad
No known key found for this signature in database
GPG Key ID: 85EC4A6AE8F69D64
4 changed files with 8 additions and 6 deletions

View File

@ -37,7 +37,7 @@ namespace osu.Game.Tests.Visual.Gameplay
[SetUpSteps] [SetUpSteps]
public void SetupSteps() public void SetupSteps()
{ {
AddStep("reset clock", () => gameplayClockContainer.Reset(false)); AddStep("reset clock", () => gameplayClockContainer.Reset());
AddStep("set hit objects", setHitObjects); AddStep("set hit objects", setHitObjects);
} }

View File

@ -174,7 +174,9 @@ namespace osu.Game.Screens.Play.HUD
protected override void UpdateObjects(IEnumerable<HitObject> objects) protected override void UpdateObjects(IEnumerable<HitObject> objects)
{ {
if (objects != null)
graph.Objects = objects; graph.Objects = objects;
info.StartTime = FirstHitTime; info.StartTime = FirstHitTime;
info.EndTime = LastHitTime; info.EndTime = LastHitTime;
bar.StartTime = FirstHitTime; bar.StartTime = FirstHitTime;

View File

@ -30,8 +30,8 @@ namespace osu.Game.Screens.Play.HUD
set set
{ {
objects = value; objects = value;
FirstHitTime = objects.FirstOrDefault()?.StartTime ?? 0; FirstHitTime = objects?.FirstOrDefault()?.StartTime ?? 0;
LastHitTime = objects.LastOrDefault()?.GetEndTime() ?? 0; LastHitTime = objects?.LastOrDefault()?.GetEndTime() ?? 0;
UpdateObjects(objects); UpdateObjects(objects);
} }
} }
@ -42,7 +42,7 @@ namespace osu.Game.Screens.Play.HUD
protected double LastHitTime { get; private set; } protected double LastHitTime { get; private set; }
protected abstract void UpdateProgress(double progress, bool isIntro); protected abstract void UpdateProgress(double progress, bool isIntro);
protected abstract void UpdateObjects(IEnumerable<HitObject> objects); protected abstract void UpdateObjects(IEnumerable<HitObject>? objects);
[BackgroundDependencyLoader] [BackgroundDependencyLoader]
private void load() private void load()

View File

@ -66,7 +66,7 @@ namespace osu.Game.Skinning
{ {
} }
protected override void UpdateObjects(IEnumerable<HitObject> objects) protected override void UpdateObjects(IEnumerable<HitObject>? objects)
{ {
} }