Skip to content

Commit

Permalink
Just expose the command update event in the hit-object command runner…
Browse files Browse the repository at this point in the history
… is enough.
  • Loading branch information
andy840119 committed Dec 7, 2024
1 parent c3d3b9d commit a405a81
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@ namespace osu.Game.Rulesets.Karaoke.Stages.Drawables;

public interface IStageHitObjectRunner
{
event Action? OnStageChanged;

event Action? OnCommandUpdated;

/// <summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,14 @@ 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!;

public void UpdateCommandGenerator(IHitObjectCommandProvider provider)
{
commandProvider = provider;
OnStageChanged?.Invoke();
OnCommandUpdated?.Invoke();
}

public void TriggerUpdateCommand()
Expand Down
1 change: 0 additions & 1 deletion osu.Game.Rulesets.Karaoke/UI/LyricPlayfield.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit a405a81

Please sign in to comment.