2018-01-05 19:21:19 +08:00
|
|
|
// Copyright (c) 2007-2018 ppy Pty Ltd <contact@ppy.sh>.
|
2017-05-23 13:11:37 +08:00
|
|
|
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
|
|
|
|
2017-12-23 15:46:02 +08:00
|
|
|
using osu.Game.Audio;
|
|
|
|
|
2017-05-23 12:55:18 +08:00
|
|
|
namespace osu.Game.Beatmaps.ControlPoints
|
|
|
|
{
|
2017-12-23 15:31:45 +08:00
|
|
|
public class SampleControlPoint : ControlPoint
|
2017-05-23 12:55:18 +08:00
|
|
|
{
|
2017-12-21 15:02:33 +08:00
|
|
|
public const string DEFAULT_BANK = "normal";
|
|
|
|
|
2017-05-23 13:11:37 +08:00
|
|
|
/// <summary>
|
|
|
|
/// The default sample bank at this control point.
|
|
|
|
/// </summary>
|
2017-12-21 15:02:33 +08:00
|
|
|
public string SampleBank = DEFAULT_BANK;
|
2017-05-23 13:11:37 +08:00
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// The default sample volume at this control point.
|
|
|
|
/// </summary>
|
2017-12-26 18:32:20 +08:00
|
|
|
public int SampleVolume = 100;
|
2017-12-23 15:46:02 +08:00
|
|
|
|
|
|
|
/// <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,
|
|
|
|
};
|
2017-05-23 12:55:18 +08:00
|
|
|
}
|
2017-12-21 15:02:33 +08:00
|
|
|
}
|