Rework/rewrite beatmap parsing to parse to base hit objects, which mode-specific beatmap converters can then use.

This commit is contained in:
smoogipooo
2017-03-13 19:15:25 +09:00
parent c76a495d3d
commit f50e0bbf3c
58 changed files with 470 additions and 322 deletions

View File

@ -3,28 +3,31 @@
using osu.Game.Beatmaps;
using osu.Game.Beatmaps.Samples;
using OpenTK.Graphics;
namespace osu.Game.Modes.Objects
{
/// <summary>
/// A hitobject describes a point in a beatmap
/// A HitObject describes an object in a Beatmap.
/// <para>
/// HitObjects may contain more properties for which you should be checking through the IHas* types.
/// </para>
/// </summary>
public abstract class HitObject
public class HitObject
{
public double StartTime;
public virtual double EndTime => StartTime;
/// <summary>
/// The time at which the HitObject starts.
/// </summary>
public double StartTime { get; set; }
public bool NewCombo { get; set; }
public Color4 Colour = new Color4(17, 136, 170, 255);
public double Duration => EndTime - StartTime;
public HitSampleInfo Sample;
public int ComboIndex;
/// <summary>
/// The sample to be played when this HitObject is hit.
/// </summary>
public HitSampleInfo Sample { get; set; }
/// <summary>
/// Sets default parameters from a beatmap.
/// </summary>
/// <param name="beatmap">The beatmap to set from.</param>
public virtual void SetDefaultsFromBeatmap(Beatmap beatmap) { }
}
}