mirror of
https://github.com/osukey/osukey.git
synced 2025-07-01 00:09:55 +09:00
Simplify and tidy sample retrieval
Less static weirdness
This commit is contained in:
@ -1,6 +1,8 @@
|
||||
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
|
||||
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
||||
|
||||
using osu.Game.Audio;
|
||||
|
||||
namespace osu.Game.Beatmaps.ControlPoints
|
||||
{
|
||||
public class SampleControlPoint : ControlPoint
|
||||
@ -16,5 +18,17 @@ namespace osu.Game.Beatmaps.ControlPoints
|
||||
/// The default sample volume at this control point.
|
||||
/// </summary>
|
||||
public int SampleVolume;
|
||||
|
||||
/// <summary>
|
||||
/// Create a SampleInfo based on the sample settings in this control point.
|
||||
/// </summary>
|
||||
/// <param name="sampleName">The name of the same.</param>
|
||||
/// <returns>A populated <see cref="SampleInfo"/>.</returns>
|
||||
public SampleInfo GetSampleInfo(string sampleName = SampleInfo.HIT_NORMAL) => new SampleInfo
|
||||
{
|
||||
Bank = SampleBank,
|
||||
Name = sampleName,
|
||||
Volume = SampleVolume,
|
||||
};
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user