Reduce implementation overhead for nested playfields (e.g. playfield + columns).

This commit is contained in:
smoogipooo
2017-08-07 14:56:26 +09:00
parent 376f99c1e3
commit c6447e40f9
4 changed files with 27 additions and 18 deletions

View File

@ -53,6 +53,17 @@ namespace osu.Game.Rulesets.UI
};
}
private List<ScrollingPlayfield<TObject, TJudgement>> nestedPlayfields;
public IEnumerable<ScrollingPlayfield<TObject, TJudgement>> NestedPlayfields => nestedPlayfields;
protected void AddNested(ScrollingPlayfield<TObject, TJudgement> otherPlayfield)
{
if (nestedPlayfields == null)
nestedPlayfields = new List<ScrollingPlayfield<TObject, TJudgement>>();
nestedPlayfields.Add(otherPlayfield);
}
protected override bool OnKeyDown(InputState state, KeyDownEventArgs args)
{
if (state.Keyboard.ControlPressed)