mirror of
https://github.com/osukey/osukey.git
synced 2025-07-03 01:09:57 +09:00
Rework/rewrite beatmap parsing to parse to base hit objects, which mode-specific beatmap converters can then use.
This commit is contained in:
@ -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) { }
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user