mirror of
https://github.com/ppy/osu.git
synced 2025-02-13 22:13:20 +08:00
Get tickSpacing from beatmap.
This commit is contained in:
parent
d6b104d794
commit
21cdee02f3
@ -2,10 +2,8 @@
|
|||||||
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
||||||
|
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using osu.Game.Audio;
|
|
||||||
using osu.Game.Beatmaps.ControlPoints;
|
using osu.Game.Beatmaps.ControlPoints;
|
||||||
using osu.Game.Database;
|
using osu.Game.Database;
|
||||||
using osu.Game.Rulesets.Mania.Judgements;
|
|
||||||
using osu.Game.Rulesets.Objects.Types;
|
using osu.Game.Rulesets.Objects.Types;
|
||||||
|
|
||||||
namespace osu.Game.Rulesets.Mania.Objects
|
namespace osu.Game.Rulesets.Mania.Objects
|
||||||
@ -29,6 +27,14 @@ namespace osu.Game.Rulesets.Mania.Objects
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
private double tickSpacing = 50;
|
private double tickSpacing = 50;
|
||||||
|
|
||||||
|
public override void ApplyDefaults(ControlPointInfo controlPointInfo, BeatmapDifficulty difficulty)
|
||||||
|
{
|
||||||
|
base.ApplyDefaults(controlPointInfo, difficulty);
|
||||||
|
|
||||||
|
TimingControlPoint timingPoint = controlPointInfo.TimingPointAt(StartTime);
|
||||||
|
tickSpacing = timingPoint.BeatLength / difficulty.SliderTickRate;
|
||||||
|
}
|
||||||
|
|
||||||
public IEnumerable<HoldNoteTick> Ticks => ticks ?? (ticks = createTicks());
|
public IEnumerable<HoldNoteTick> Ticks => ticks ?? (ticks = createTicks());
|
||||||
private List<HoldNoteTick> ticks;
|
private List<HoldNoteTick> ticks;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user