-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use more generic way to apply the value to the stage runner.
- Loading branch information
1 parent
a405a81
commit 2190387
Showing
5 changed files
with
47 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 11 additions & 3 deletions
14
osu.Game.Rulesets.Karaoke/Stages/Drawables/StageElementRunner.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,26 @@ | ||
// Copyright (c) andy840119 <[email protected]>. Licensed under the GPL Licence. | ||
// See the LICENCE file in the repository root for full licence text. | ||
|
||
using System.Collections.Generic; | ||
using osu.Framework.Graphics.Containers; | ||
using osu.Game.Rulesets.Karaoke.Stages.Infos; | ||
using osu.Game.Rulesets.Mods; | ||
|
||
namespace osu.Game.Rulesets.Karaoke.Stages.Drawables; | ||
|
||
public class StageElementRunner : IStageElementRunner | ||
public class StageElementRunner : StageRunner, IStageElementRunner | ||
{ | ||
private IStageElementProvider? elementProvider; | ||
private Container? elementContainer; | ||
|
||
public void UpdateCommandGenerator(IStageElementProvider provider) | ||
public override void OnStageInfoChanged(StageInfo stageInfo, bool scorable, IReadOnlyList<Mod> mods) | ||
{ | ||
elementProvider = stageInfo.CreateStageElementProvider(scorable); | ||
applyTransforms(); | ||
} | ||
|
||
public override void TriggerUpdateCommand() | ||
{ | ||
elementProvider = provider; | ||
applyTransforms(); | ||
} | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
// Copyright (c) andy840119 <[email protected]>. Licensed under the GPL Licence. | ||
// See the LICENCE file in the repository root for full licence text. | ||
|
||
using System.Collections.Generic; | ||
using osu.Game.Rulesets.Karaoke.Stages.Infos; | ||
using osu.Game.Rulesets.Mods; | ||
|
||
namespace osu.Game.Rulesets.Karaoke.Stages.Drawables; | ||
|
||
public abstract partial class StageRunner | ||
{ | ||
public abstract void OnStageInfoChanged(StageInfo stageInfo, bool scorable, IReadOnlyList<Mod> mods); | ||
|
||
public abstract void TriggerUpdateCommand(); | ||
} |