Ensure SliderCurve is assigned Calculated before used.

This commit is contained in:
Dean Herbert
2017-02-14 18:40:37 +09:00
parent fc192906ea
commit e88d02d3c4
3 changed files with 32 additions and 14 deletions

View File

@ -1,6 +1,7 @@
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
using System.Collections.Generic;
using osu.Game.Beatmaps;
using OpenTK;
@ -19,11 +20,28 @@ namespace osu.Game.Modes.Osu.Objects
set
{
stackHeight = value;
if (Curve != null)
Curve.Offset = StackOffset;
Curve.Offset = StackOffset;
}
}
public List<Vector2> ControlPoints
{
get { return Curve.ControlPoints; }
set { Curve.ControlPoints = value; }
}
public double Length
{
get { return Curve.Length; }
set { Curve.Length = value; }
}
public CurveTypes CurveType
{
get { return Curve.CurveType; }
set { Curve.CurveType = value; }
}
public double Velocity;
public override void SetDefaultsFromBeatmap(Beatmap beatmap)
@ -35,7 +53,7 @@ namespace osu.Game.Modes.Osu.Objects
public int RepeatCount;
public SliderCurve Curve;
internal readonly SliderCurve Curve = new SliderCurve();
}
public enum CurveTypes