1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-06 06:57:39 +08:00

Move list initialisation to pattern generation code

This commit is contained in:
Dean Herbert 2017-12-23 19:17:05 +09:00
parent aeafa5645a
commit e7c85d38a8
2 changed files with 5 additions and 8 deletions

View File

@ -76,10 +76,10 @@ namespace osu.Game.Rulesets.Mania.Beatmaps.Patterns.Legacy
Duration = endTime - HitObject.StartTime
};
hold.Head.Samples.Add(new SampleInfo
{
Name = SampleInfo.HIT_NORMAL
});
if (hold.Head.Samples == null)
hold.Head.Samples = new SampleInfoList();
hold.Head.Samples.Add(new SampleInfo { Name = SampleInfo.HIT_NORMAL });
hold.Tail.Samples = HitObject.Samples;

View File

@ -50,10 +50,7 @@ namespace osu.Game.Rulesets.Mania.Objects
/// <summary>
/// The head note of the hold.
/// </summary>
public readonly Note Head = new Note
{
Samples = new Audio.SampleInfoList()
};
public readonly Note Head = new Note();
/// <summary>
/// The tail note of the hold.