mirror of
https://github.com/osukey/osukey.git
synced 2025-07-02 00:40:09 +09:00
Merge branch 'master' into beatmap_parsing
This commit is contained in:
@ -23,6 +23,14 @@ namespace osu.Game.Modes.UI
|
||||
|
||||
internal readonly PlayerInputManager InputManager = new PlayerInputManager();
|
||||
|
||||
protected readonly KeyConversionInputManager KeyConversionInputManager;
|
||||
|
||||
protected HitRenderer()
|
||||
{
|
||||
KeyConversionInputManager = CreateKeyConversionInputManager();
|
||||
KeyConversionInputManager.RelativeSizeAxes = Axes.Both;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Whether all the HitObjects have been judged.
|
||||
/// </summary>
|
||||
@ -35,6 +43,8 @@ namespace osu.Game.Modes.UI
|
||||
if (AllObjectsJudged)
|
||||
OnAllJudged?.Invoke();
|
||||
}
|
||||
|
||||
protected virtual KeyConversionInputManager CreateKeyConversionInputManager() => new KeyConversionInputManager();
|
||||
}
|
||||
|
||||
public abstract class HitRenderer<TObject> : HitRenderer
|
||||
@ -42,8 +52,6 @@ namespace osu.Game.Modes.UI
|
||||
{
|
||||
public Beatmap<TObject> Beatmap;
|
||||
|
||||
public IEnumerable<DrawableHitObject> DrawableObjects => Playfield.HitObjects.Children;
|
||||
|
||||
protected override Container<Drawable> Content => content;
|
||||
protected override bool AllObjectsJudged => Playfield.HitObjects.Children.All(h => h.Judgement.Result.HasValue);
|
||||
|
||||
@ -64,13 +72,12 @@ namespace osu.Game.Modes.UI
|
||||
|
||||
RelativeSizeAxes = Axes.Both;
|
||||
|
||||
KeyConversionInputManager.Add(Playfield = CreatePlayfield());
|
||||
|
||||
InputManager.Add(content = new Container
|
||||
{
|
||||
RelativeSizeAxes = Axes.Both,
|
||||
Children = new[]
|
||||
{
|
||||
Playfield = CreatePlayfield(),
|
||||
}
|
||||
Children = new[] { KeyConversionInputManager }
|
||||
});
|
||||
|
||||
AddInternal(InputManager);
|
||||
|
Reference in New Issue
Block a user