1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-06 23:47:29 +08:00
osu-lazer/osu.Game.Mode.Osu/Objects/Slider.cs

34 lines
858 B
C#
Raw Normal View History

//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.Database;
using osu.Game.Beatmaps;
using System;
2016-11-14 17:54:24 +08:00
namespace osu.Game.Modes.Osu.Objects
{
public class Slider : OsuHitObject
{
public override double EndTime => StartTime + RepeatCount * Curve.Length / Velocity;
public double Velocity;
public override void SetDefaultsFromBeatmap(Beatmap beatmap)
{
Velocity = 100 / beatmap.BeatLengthAt(StartTime, true) * beatmap.BeatmapInfo.BaseDifficulty.SliderMultiplier;
}
public int RepeatCount;
2016-11-17 20:29:35 +08:00
public SliderCurve Curve;
}
2016-11-17 20:29:35 +08:00
public enum CurveTypes
{
Catmull,
Bezier,
Linear,
PerfectCurve
}
}