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:
@ -5,14 +5,16 @@ using OpenTK;
|
||||
using osu.Game.Beatmaps;
|
||||
using osu.Game.Beatmaps.Samples;
|
||||
using osu.Game.Beatmaps.Timing;
|
||||
using osu.Game.Modes.Objects.Types;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace osu.Game.Modes.Osu.Objects
|
||||
{
|
||||
public class Slider : OsuHitObject
|
||||
public class Slider : OsuHitObject, IHasEndTime
|
||||
{
|
||||
public override double EndTime => StartTime + RepeatCount * Curve.Length / Velocity;
|
||||
public double EndTime => StartTime + RepeatCount * Curve.Length / Velocity;
|
||||
public double Duration => EndTime - StartTime;
|
||||
|
||||
public override Vector2 EndPosition => PositionAt(1);
|
||||
|
||||
@ -64,7 +66,7 @@ namespace osu.Game.Modes.Osu.Objects
|
||||
set { Curve.Length = value; }
|
||||
}
|
||||
|
||||
public CurveTypes CurveType
|
||||
public CurveType CurveType
|
||||
{
|
||||
get { return Curve.CurveType; }
|
||||
set { Curve.CurveType = value; }
|
||||
@ -124,7 +126,7 @@ namespace osu.Game.Modes.Osu.Objects
|
||||
Position = Curve.PositionAt(distanceProgress),
|
||||
StackHeight = StackHeight,
|
||||
Scale = Scale,
|
||||
Colour = Colour,
|
||||
ComboColour = ComboColour,
|
||||
Sample = new HitSampleInfo
|
||||
{
|
||||
Type = SampleType.None,
|
||||
@ -138,12 +140,4 @@ namespace osu.Game.Modes.Osu.Objects
|
||||
|
||||
public override HitObjectType Type => HitObjectType.Slider;
|
||||
}
|
||||
|
||||
public enum CurveTypes
|
||||
{
|
||||
Catmull,
|
||||
Bezier,
|
||||
Linear,
|
||||
PerfectCurve
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user