From a405a8141a705897c0fc63e6f8f7596262f7492d Mon Sep 17 00:00:00 2001 From: andy840119 Date: Sat, 7 Dec 2024 14:39:04 +0800 Subject: [PATCH] Just expose the command update event in the hit-object command runner is enough. --- .../Stages/Drawables/IStageHitObjectRunner.cs | 2 -- .../Stages/Drawables/StageHitObjectRunner.cs | 4 +--- osu.Game.Rulesets.Karaoke/UI/LyricPlayfield.cs | 1 - 3 files changed, 1 insertion(+), 6 deletions(-) diff --git a/osu.Game.Rulesets.Karaoke/Stages/Drawables/IStageHitObjectRunner.cs b/osu.Game.Rulesets.Karaoke/Stages/Drawables/IStageHitObjectRunner.cs index e53594d42..10b413336 100644 --- a/osu.Game.Rulesets.Karaoke/Stages/Drawables/IStageHitObjectRunner.cs +++ b/osu.Game.Rulesets.Karaoke/Stages/Drawables/IStageHitObjectRunner.cs @@ -11,8 +11,6 @@ namespace osu.Game.Rulesets.Karaoke.Stages.Drawables; public interface IStageHitObjectRunner { - event Action? OnStageChanged; - event Action? OnCommandUpdated; /// diff --git a/osu.Game.Rulesets.Karaoke/Stages/Drawables/StageHitObjectRunner.cs b/osu.Game.Rulesets.Karaoke/Stages/Drawables/StageHitObjectRunner.cs index bc50072c5..3ec958865 100644 --- a/osu.Game.Rulesets.Karaoke/Stages/Drawables/StageHitObjectRunner.cs +++ b/osu.Game.Rulesets.Karaoke/Stages/Drawables/StageHitObjectRunner.cs @@ -13,8 +13,6 @@ namespace osu.Game.Rulesets.Karaoke.Stages.Drawables; public partial class StageHitObjectRunner : Component, IStageHitObjectRunner { - public event Action? OnStageChanged; - public event Action? OnCommandUpdated; private IHitObjectCommandProvider commandProvider = null!; @@ -22,7 +20,7 @@ public partial class StageHitObjectRunner : Component, IStageHitObjectRunner public void UpdateCommandGenerator(IHitObjectCommandProvider provider) { commandProvider = provider; - OnStageChanged?.Invoke(); + OnCommandUpdated?.Invoke(); } public void TriggerUpdateCommand() diff --git a/osu.Game.Rulesets.Karaoke/UI/LyricPlayfield.cs b/osu.Game.Rulesets.Karaoke/UI/LyricPlayfield.cs index fbd5b844c..6ac69c570 100644 --- a/osu.Game.Rulesets.Karaoke/UI/LyricPlayfield.cs +++ b/osu.Game.Rulesets.Karaoke/UI/LyricPlayfield.cs @@ -80,7 +80,6 @@ public LyricHitObjectLifetimeEntry(HitObject hitObject, IStageHitObjectRunner? r // Manually set to reduce the number of future alive objects to a bare minimum. updateLifetime(); - stageRunner.OnStageChanged += updateLifetime; stageRunner.OnCommandUpdated += updateLifetime; }