Fix a few visual tests failing.

This commit is contained in:
smoogipooo
2017-03-14 17:01:46 +09:00
parent 7141bc86d3
commit e52d5181f7
6 changed files with 9 additions and 9 deletions

View File

@ -48,6 +48,7 @@ namespace osu.Desktop.VisualTests.Tests
HitObjects = objects, HitObjects = objects,
BeatmapInfo = new BeatmapInfo BeatmapInfo = new BeatmapInfo
{ {
BaseDifficulty = new BaseDifficulty(),
Metadata = new BeatmapMetadata Metadata = new BeatmapMetadata
{ {
Artist = @"Unknown", Artist = @"Unknown",

View File

@ -65,7 +65,7 @@ namespace osu.Desktop.VisualTests.Tests
new Vector2(-200, 0), new Vector2(-200, 0),
new Vector2(400, 0), new Vector2(400, 0),
}, },
Length = 400, Distance = 400,
Position = new Vector2(-200, 0), Position = new Vector2(-200, 0),
Velocity = 1, Velocity = 1,
TickDistance = 100, TickDistance = 100,

View File

@ -68,6 +68,7 @@ namespace osu.Desktop.VisualTests.Tests
HitObjects = objects, HitObjects = objects,
BeatmapInfo = new BeatmapInfo BeatmapInfo = new BeatmapInfo
{ {
BaseDifficulty = new BaseDifficulty(),
Metadata = new BeatmapMetadata Metadata = new BeatmapMetadata
{ {
Artist = @"Unknown", Artist = @"Unknown",

View File

@ -54,7 +54,7 @@ namespace osu.Game.Modes.Osu.Beatmaps
NewCombo = comboData?.NewCombo ?? false, NewCombo = comboData?.NewCombo ?? false,
Length = distanceData?.Distance ?? 0, Distance = distanceData?.Distance ?? 0,
RepeatCount = repeatsData?.RepeatCount ?? 0 RepeatCount = repeatsData?.RepeatCount ?? 0
}; };

View File

@ -10,7 +10,7 @@ using OpenTK.Graphics;
namespace osu.Game.Modes.Osu.Objects namespace osu.Game.Modes.Osu.Objects
{ {
public abstract class OsuHitObject : HitObject, IHasCombo public abstract class OsuHitObject : HitObject, IHasCombo, IHasPosition
{ {
public const double OBJECT_RADIUS = 64; public const double OBJECT_RADIUS = 64;
@ -37,10 +37,8 @@ namespace osu.Game.Modes.Osu.Objects
public abstract HitObjectType Type { get; } public abstract HitObjectType Type { get; }
public virtual bool NewCombo { get; set; }
public Color4 ComboColour { get; set; } public Color4 ComboColour { get; set; }
public virtual bool NewCombo { get; set; }
public int ComboIndex { get; set; } public int ComboIndex { get; set; }
public double HitWindowFor(OsuScoreResult result) public double HitWindowFor(OsuScoreResult result)

View File

@ -11,7 +11,7 @@ using System.Collections.Generic;
namespace osu.Game.Modes.Osu.Objects namespace osu.Game.Modes.Osu.Objects
{ {
public class Slider : OsuHitObject, IHasEndTime public class Slider : OsuHitObject, IHasEndTime, IHasCurve, IHasDistance, IHasRepeats
{ {
public double EndTime => StartTime + RepeatCount * Curve.Length / Velocity; public double EndTime => StartTime + RepeatCount * Curve.Length / Velocity;
public double Duration => EndTime - StartTime; public double Duration => EndTime - StartTime;
@ -60,7 +60,7 @@ namespace osu.Game.Modes.Osu.Objects
set { Curve.ControlPoints = value; } set { Curve.ControlPoints = value; }
} }
public double Length public double Distance
{ {
get { return Curve.Length; } get { return Curve.Length; }
set { Curve.Length = value; } set { Curve.Length = value; }
@ -90,7 +90,7 @@ namespace osu.Game.Modes.Osu.Objects
TickDistance = baseVelocity / baseDifficulty.SliderTickRate; TickDistance = baseVelocity / baseDifficulty.SliderTickRate;
} }
public int RepeatCount = 1; public int RepeatCount { get; set; } = 1;
internal readonly SliderCurve Curve = new SliderCurve(); internal readonly SliderCurve Curve = new SliderCurve();