diff --git a/RhythmGameUtilities/Scripts/Parsers.cs b/RhythmGameUtilities/Scripts/Parsers.cs index 8d6b0e6..c7986e9 100644 --- a/RhythmGameUtilities/Scripts/Parsers.cs +++ b/RhythmGameUtilities/Scripts/Parsers.cs @@ -125,6 +125,7 @@ public static Dictionary ParseBpmFromChartSection( return section .Where(item => item.Value[0] == TypeCode.BPM) .Select(item => new KeyValuePair(int.Parse(item.Key), int.Parse(item.Value.Skip(1).First()))) + .OrderBy(item => item.Key) .ToDictionary(item => item.Key, x => x.Value); } diff --git a/RhythmGameUtilities/Structs/Song.cs b/RhythmGameUtilities/Structs/Song.cs index 1582516..336e8dd 100644 --- a/RhythmGameUtilities/Structs/Song.cs +++ b/RhythmGameUtilities/Structs/Song.cs @@ -98,20 +98,6 @@ public class Song [JsonProperty] public Dictionary BPM { get; internal set; } - [JsonIgnore] - public Dictionary SortedBPM - { - get - { - if (_sortedBPM.Count != BPM.Count) - { - _sortedBPM = new Dictionary(BPM.OrderBy(b => b.Key)); - } - - return _sortedBPM; - } - } - [JsonProperty] public Dictionary TimeSignatures { get; internal set; } diff --git a/UnityPackage/Scripts/Parsers.cs b/UnityPackage/Scripts/Parsers.cs index 8d6b0e6..c7986e9 100644 --- a/UnityPackage/Scripts/Parsers.cs +++ b/UnityPackage/Scripts/Parsers.cs @@ -125,6 +125,7 @@ public static Dictionary ParseBpmFromChartSection( return section .Where(item => item.Value[0] == TypeCode.BPM) .Select(item => new KeyValuePair(int.Parse(item.Key), int.Parse(item.Value.Skip(1).First()))) + .OrderBy(item => item.Key) .ToDictionary(item => item.Key, x => x.Value); } diff --git a/UnityPackage/Structs/Song.cs b/UnityPackage/Structs/Song.cs index 1582516..336e8dd 100644 --- a/UnityPackage/Structs/Song.cs +++ b/UnityPackage/Structs/Song.cs @@ -98,20 +98,6 @@ public class Song [JsonProperty] public Dictionary BPM { get; internal set; } - [JsonIgnore] - public Dictionary SortedBPM - { - get - { - if (_sortedBPM.Count != BPM.Count) - { - _sortedBPM = new Dictionary(BPM.OrderBy(b => b.Key)); - } - - return _sortedBPM; - } - } - [JsonProperty] public Dictionary TimeSignatures { get; internal set; }