BarLine : TaikoHitObject.

This commit is contained in:
Dean Herbert 2017-04-05 11:48:30 +09:00
parent 1b2713239a
commit abf6dbc307
No known key found for this signature in database
GPG Key ID: 46D71BF4958ABB49
2 changed files with 5 additions and 22 deletions

View File

@ -1,26 +1,9 @@
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
using osu.Game.Beatmaps.Timing;
using osu.Game.Database;
namespace osu.Game.Modes.Taiko.Objects
{
public class BarLine
public class BarLine : TaikoHitObject
{
/// <summary>
/// The start time of the control point this bar line represents.
/// </summary>
public double StartTime;
/// <summary>
/// The time to scroll in the bar line.
/// </summary>
public double PreEmpt;
public void ApplyDefaults(TimingInfo timing, BeatmapDifficulty difficulty)
{
PreEmpt = TaikoHitObject.BASE_SCROLL_TIME / difficulty.SliderMultiplier * timing.BeatLengthAt(StartTime) * timing.SpeedMultiplierAt(StartTime) / 1000;
}
}
}

View File

@ -62,14 +62,14 @@ protected override void LoadComplete()
{
base.LoadComplete();
LifetimeStart = BarLine.StartTime - BarLine.PreEmpt * 2;
LifetimeEnd = BarLine.StartTime + BarLine.PreEmpt;
LifetimeStart = BarLine.StartTime - BarLine.ScrollTime * 2;
LifetimeEnd = BarLine.StartTime + BarLine.ScrollTime;
Delay(BarLine.StartTime - Time.Current);
FadeOut(base_fadeout_time * BarLine.PreEmpt / 1000);
FadeOut(base_fadeout_time * BarLine.ScrollTime / 1000);
}
private void updateScrollPosition(double time) => MoveToX((float)((BarLine.StartTime - time) / BarLine.PreEmpt));
private void updateScrollPosition(double time) => MoveToX((float)((BarLine.StartTime - time) / BarLine.ScrollTime));
protected override void Update()
{