From e7fd7742cf420beccb7b6cdf83dac468effe93c2 Mon Sep 17 00:00:00 2001 From: andy840119 Date: Mon, 9 Nov 2020 22:30:00 +0900 Subject: [PATCH 1/2] Update package and fix compile error. --- osu.Game.Rulesets.Karaoke/Statistics/BeatmapInfoGraph.cs | 4 ++-- osu.Game.Rulesets.Karaoke/osu.Game.Rulesets.Karaoke.csproj | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/osu.Game.Rulesets.Karaoke/Statistics/BeatmapInfoGraph.cs b/osu.Game.Rulesets.Karaoke/Statistics/BeatmapInfoGraph.cs index af8642e81..b8d09d2db 100644 --- a/osu.Game.Rulesets.Karaoke/Statistics/BeatmapInfoGraph.cs +++ b/osu.Game.Rulesets.Karaoke/Statistics/BeatmapInfoGraph.cs @@ -33,9 +33,9 @@ protected override bool OnClick(ClickEvent e) } [BackgroundDependencyLoader(true)] - private void load([CanBeNull] IBindable workingBeatmap, [CanBeNull] BeatmapDifficultyManager difficultyManager) + private void load([CanBeNull] IBindable workingBeatmap, [CanBeNull] BeatmapDifficultyCache difficultyCache) { - var beatmapDifficulty = difficultyManager.GetDifficulty(beatmap.BeatmapInfo); + var beatmapDifficulty = difficultyCache.GetBindableDifficulty(beatmap.BeatmapInfo).Value; if (workingBeatmap != null) { LoadComponentAsync(new BeatmapInfoWedge(workingBeatmap.Value, beatmapDifficulty), Add); diff --git a/osu.Game.Rulesets.Karaoke/osu.Game.Rulesets.Karaoke.csproj b/osu.Game.Rulesets.Karaoke/osu.Game.Rulesets.Karaoke.csproj index 278cae648..52a22b39f 100644 --- a/osu.Game.Rulesets.Karaoke/osu.Game.Rulesets.Karaoke.csproj +++ b/osu.Game.Rulesets.Karaoke/osu.Game.Rulesets.Karaoke.csproj @@ -14,7 +14,7 @@ - + From efa143c85449c157f91523fb8117958972db1d1d Mon Sep 17 00:00:00 2001 From: andy840119 Date: Mon, 9 Nov 2020 22:54:37 +0900 Subject: [PATCH 2/2] fix compile warning. --- .../Edit/LyricEditor/Components/LyricControl.cs | 2 +- .../Mods/KaraokeModHiddenNote.cs | 2 +- .../Objects/Drawables/DrawableBarLine.cs | 2 +- .../Objects/Drawables/DrawableKaraokeHitObject.cs | 13 ------------- .../Objects/Drawables/DrawableLyric.cs | 4 ++-- 5 files changed, 5 insertions(+), 18 deletions(-) diff --git a/osu.Game.Rulesets.Karaoke/Edit/LyricEditor/Components/LyricControl.cs b/osu.Game.Rulesets.Karaoke/Edit/LyricEditor/Components/LyricControl.cs index b21fb4634..e03b2f96b 100644 --- a/osu.Game.Rulesets.Karaoke/Edit/LyricEditor/Components/LyricControl.cs +++ b/osu.Game.Rulesets.Karaoke/Edit/LyricEditor/Components/LyricControl.cs @@ -50,7 +50,7 @@ protected override void ApplyLayout(KaraokeLayout layout) Padding = new MarginPadding(0); } - protected override void UpdateStateTransforms(ArmedState state) + protected override void UpdateStartTimeStateTransforms() { // Do not fade-in / fade-out while changing armed state. } diff --git a/osu.Game.Rulesets.Karaoke/Mods/KaraokeModHiddenNote.cs b/osu.Game.Rulesets.Karaoke/Mods/KaraokeModHiddenNote.cs index a7860fc69..f9eef603d 100644 --- a/osu.Game.Rulesets.Karaoke/Mods/KaraokeModHiddenNote.cs +++ b/osu.Game.Rulesets.Karaoke/Mods/KaraokeModHiddenNote.cs @@ -36,7 +36,7 @@ public override void ApplyToDrawableHitObjects(IEnumerable dr base.ApplyToDrawableHitObjects(drawables); } - protected override void ApplyHiddenState(DrawableHitObject hitObject, ArmedState state) + protected override void ApplyNormalVisibilityState(DrawableHitObject hitObject, ArmedState state) { if (!(hitObject is DrawableNote note)) return; diff --git a/osu.Game.Rulesets.Karaoke/Objects/Drawables/DrawableBarLine.cs b/osu.Game.Rulesets.Karaoke/Objects/Drawables/DrawableBarLine.cs index abd64eca8..a8ca7d109 100644 --- a/osu.Game.Rulesets.Karaoke/Objects/Drawables/DrawableBarLine.cs +++ b/osu.Game.Rulesets.Karaoke/Objects/Drawables/DrawableBarLine.cs @@ -71,7 +71,7 @@ protected override void UpdateInitialTransforms() { } - protected override void UpdateStateTransforms(ArmedState state) + protected override void UpdateStartTimeStateTransforms() { } } diff --git a/osu.Game.Rulesets.Karaoke/Objects/Drawables/DrawableKaraokeHitObject.cs b/osu.Game.Rulesets.Karaoke/Objects/Drawables/DrawableKaraokeHitObject.cs index 52d57aecf..91b929ff7 100644 --- a/osu.Game.Rulesets.Karaoke/Objects/Drawables/DrawableKaraokeHitObject.cs +++ b/osu.Game.Rulesets.Karaoke/Objects/Drawables/DrawableKaraokeHitObject.cs @@ -16,19 +16,6 @@ protected DrawableKaraokeHitObject(KaraokeHitObject hitObject) protected sealed override double InitialLifetimeOffset => HitObject.TimePreempt; - protected override void UpdateStateTransforms(ArmedState state) - { - base.UpdateStateTransforms(state); - - switch (state) - { - case ArmedState.Idle: - // Manually set to reduce the number of future alive objects to a bare minimum. - LifetimeStart = HitObject.StartTime - HitObject.TimePreempt; - break; - } - } - protected override JudgementResult CreateResult(Judgement judgement) => new KaraokeJudgementResult(HitObject, judgement); } } diff --git a/osu.Game.Rulesets.Karaoke/Objects/Drawables/DrawableLyric.cs b/osu.Game.Rulesets.Karaoke/Objects/Drawables/DrawableLyric.cs index b090371c9..65e179432 100644 --- a/osu.Game.Rulesets.Karaoke/Objects/Drawables/DrawableLyric.cs +++ b/osu.Game.Rulesets.Karaoke/Objects/Drawables/DrawableLyric.cs @@ -178,9 +178,9 @@ protected override void CheckForResult(bool userTriggered, double timeOffset) } } - protected override void UpdateStateTransforms(ArmedState state) + protected override void UpdateStartTimeStateTransforms() { - base.UpdateStateTransforms(state); + base.UpdateStartTimeStateTransforms(); using (BeginDelayedSequence(HitObject.Duration, true)) {