mirror of
https://github.com/ppy/osu.git
synced 2024-11-07 13:47:33 +08:00
43f0409893
- Allow basic clicking of hitobjects. - Break non-osu! game modes temporarily. - Fix some issues with RollingCounters. - Add the ability to increment counters.
35 lines
1.0 KiB
C#
35 lines
1.0 KiB
C#
//Copyright (c) 2007-2016 ppy Pty Ltd <contact@ppy.sh>.
|
|
//Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
|
|
|
using osu.Game.Beatmaps.Objects.Osu;
|
|
using osu.Game.Beatmaps.Samples;
|
|
using osu.Game.GameModes.Play;
|
|
|
|
namespace osu.Game.Beatmaps.Objects
|
|
{
|
|
/// <summary>
|
|
/// A hitobject describes a point in a beatmap
|
|
/// </summary>
|
|
public abstract class HitObject
|
|
{
|
|
public double StartTime;
|
|
public virtual double EndTime => StartTime;
|
|
|
|
public double Duration => EndTime - StartTime;
|
|
|
|
public HitSampleInfo Sample;
|
|
|
|
public static HitObject Parse(PlayMode mode, string val)
|
|
{
|
|
//TODO: move to modular HitObjectParser system rather than static parsing. (https://github.com/ppy/osu/pull/60/files#r83135780)
|
|
switch (mode)
|
|
{
|
|
case PlayMode.Osu:
|
|
return OsuBaseHit.Parse(val);
|
|
default:
|
|
return null;
|
|
}
|
|
}
|
|
}
|
|
}
|