Add hit object stacking.

This commit is contained in:
Damnae
2017-02-09 06:56:39 +01:00
parent 2e5ad31cc7
commit 38b25a7df3
16 changed files with 187 additions and 27 deletions

View File

@ -1,6 +1,7 @@
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
using osu.Game.Beatmaps;
using System;
using System.Collections.Generic;
@ -9,7 +10,7 @@ namespace osu.Game.Modes.Objects
public abstract class HitObjectConverter<T>
where T : HitObject
{
public abstract List<T> Convert(List<HitObject> input);
public abstract List<T> Convert(Beatmap beatmap);
}
public class HitObjectConvertException : Exception

View File

@ -28,7 +28,7 @@ namespace osu.Game.Modes
public abstract ScoreProcessor CreateScoreProcessor(int hitObjectCount);
public abstract HitRenderer CreateHitRendererWith(List<HitObject> objects);
public abstract HitRenderer CreateHitRendererWith(Beatmap beatmap);
public abstract HitObjectParser CreateHitObjectParser();

View File

@ -9,6 +9,7 @@ using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
using osu.Game.Modes.Objects;
using osu.Game.Modes.Objects.Drawables;
using osu.Game.Beatmaps;
namespace osu.Game.Modes.UI
{
@ -37,7 +38,7 @@ namespace osu.Game.Modes.UI
{
private List<T> objects;
public List<HitObject> Objects
public Beatmap Beatmap
{
set
{
@ -51,7 +52,7 @@ namespace osu.Game.Modes.UI
protected abstract HitObjectConverter<T> Converter { get; }
protected virtual List<T> Convert(List<HitObject> objects) => Converter.Convert(objects);
protected virtual List<T> Convert(Beatmap beatmap) => Converter.Convert(beatmap);
public HitRenderer()
{