Make compile.

This commit is contained in:
smoogipooo 2017-05-18 12:50:12 +09:00
parent f6dc85c2f8
commit 16eda2467f
1 changed files with 8 additions and 2 deletions

View File

@ -27,6 +27,8 @@ internal class LegacyConverter
private readonly double lastNoteTime;
private readonly float lastNotePosition;
private ObjectRow lastRow = new ObjectRow();
private readonly int availableColumns;
private readonly float localXDivisor;
@ -105,7 +107,7 @@ private IEnumerable<ManiaHitObject> generateConverted(HitObject original)
ObjectConversion conversion = null;
if (distanceData != null)
conversion = new DistanceObjectConversion(distanceData, beatmap);
conversion = new DistanceObjectConversion(original, lastRow, random, beatmap);
else if (endTimeData != null)
{
// Spinner
@ -118,8 +120,12 @@ private IEnumerable<ManiaHitObject> generateConverted(HitObject original)
if (conversion == null)
yield break;
foreach (ManiaHitObject obj in conversion.GenerateConversion().HitObjects)
ObjectRow newRow = conversion.GenerateConversion();
foreach (ManiaHitObject obj in newRow.HitObjects)
yield return obj;
lastRow = newRow;
}
private int getColumn(float position) => MathHelper.Clamp((int)Math.Floor(position / localXDivisor), 0, availableColumns - 1);