mirror of
https://github.com/osukey/osukey.git
synced 2025-07-01 00:09:55 +09:00
Fix skinning support for combobreak
This commit is contained in:
@ -24,8 +24,8 @@ namespace osu.Game.Beatmaps.ControlPoints
|
||||
/// 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
|
||||
/// <returns>A populated <see cref="HitSampleInfo"/>.</returns>
|
||||
public HitSampleInfo GetSampleInfo(string sampleName = HitSampleInfo.HIT_NORMAL) => new HitSampleInfo
|
||||
{
|
||||
Bank = SampleBank,
|
||||
Name = sampleName,
|
||||
@ -33,15 +33,15 @@ namespace osu.Game.Beatmaps.ControlPoints
|
||||
};
|
||||
|
||||
/// <summary>
|
||||
/// Applies <see cref="SampleBank"/> and <see cref="SampleVolume"/> to a <see cref="SampleInfo"/> if necessary, returning the modified <see cref="SampleInfo"/>.
|
||||
/// Applies <see cref="SampleBank"/> and <see cref="SampleVolume"/> to a <see cref="HitSampleInfo"/> if necessary, returning the modified <see cref="HitSampleInfo"/>.
|
||||
/// </summary>
|
||||
/// <param name="sampleInfo">The <see cref="SampleInfo"/>. This will not be modified.</param>
|
||||
/// <returns>The modified <see cref="SampleInfo"/>. This does not share a reference with <paramref name="sampleInfo"/>.</returns>
|
||||
public virtual SampleInfo ApplyTo(SampleInfo sampleInfo)
|
||||
/// <param name="hitSampleInfo">The <see cref="HitSampleInfo"/>. This will not be modified.</param>
|
||||
/// <returns>The modified <see cref="HitSampleInfo"/>. This does not share a reference with <paramref name="hitSampleInfo"/>.</returns>
|
||||
public virtual HitSampleInfo ApplyTo(HitSampleInfo hitSampleInfo)
|
||||
{
|
||||
var newSampleInfo = sampleInfo.Clone();
|
||||
newSampleInfo.Bank = sampleInfo.Bank ?? SampleBank;
|
||||
newSampleInfo.Volume = sampleInfo.Volume > 0 ? sampleInfo.Volume : SampleVolume;
|
||||
var newSampleInfo = hitSampleInfo.Clone();
|
||||
newSampleInfo.Bank = hitSampleInfo.Bank ?? SampleBank;
|
||||
newSampleInfo.Volume = hitSampleInfo.Volume > 0 ? hitSampleInfo.Volume : SampleVolume;
|
||||
return newSampleInfo;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user