1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-07 07:27:25 +08:00
osu-lazer/osu.Game/Beatmaps/ControlPoints/SampleControlPoint.cs

35 lines
1.1 KiB
C#
Raw Normal View History

2017-05-23 13:11:37 +08:00
// 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
{
public const string DEFAULT_BANK = "normal";
2017-05-23 13:11:37 +08:00
/// <summary>
/// The default sample bank at this control point.
/// </summary>
public string SampleBank = DEFAULT_BANK;
2017-05-23 13:11:37 +08:00
/// <summary>
/// The default sample volume at this control point.
/// </summary>
public int SampleVolume = 100;
/// <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,
};
}
}