mirror of
https://github.com/osukey/osukey.git
synced 2025-07-01 08:20:00 +09:00
Fix skinning support for combobreak
This commit is contained in:
@ -180,7 +180,7 @@ namespace osu.Game.Rulesets.Objects.Legacy
|
||||
}
|
||||
|
||||
// Generate the final per-node samples
|
||||
var nodeSamples = new List<List<SampleInfo>>(nodes);
|
||||
var nodeSamples = new List<List<HitSampleInfo>>(nodes);
|
||||
for (int i = 0; i < nodes; i++)
|
||||
nodeSamples.Add(convertSoundType(nodeSoundTypes[i], nodeBankInfos[i]));
|
||||
|
||||
@ -291,7 +291,7 @@ namespace osu.Game.Rulesets.Objects.Legacy
|
||||
/// <param name="repeatCount">The slider repeat count.</param>
|
||||
/// <param name="nodeSamples">The samples to be played when the slider nodes are hit. This includes the head and tail of the slider.</param>
|
||||
/// <returns>The hit object.</returns>
|
||||
protected abstract HitObject CreateSlider(Vector2 position, bool newCombo, int comboOffset, Vector2[] controlPoints, double length, PathType pathType, int repeatCount, List<List<SampleInfo>> nodeSamples);
|
||||
protected abstract HitObject CreateSlider(Vector2 position, bool newCombo, int comboOffset, Vector2[] controlPoints, double length, PathType pathType, int repeatCount, List<List<HitSampleInfo>> nodeSamples);
|
||||
|
||||
/// <summary>
|
||||
/// Creates a legacy Spinner-type hit object.
|
||||
@ -312,14 +312,14 @@ namespace osu.Game.Rulesets.Objects.Legacy
|
||||
/// <param name="endTime">The hold end time.</param>
|
||||
protected abstract HitObject CreateHold(Vector2 position, bool newCombo, int comboOffset, double endTime);
|
||||
|
||||
private List<SampleInfo> convertSoundType(LegacySoundType type, SampleBankInfo bankInfo)
|
||||
private List<HitSampleInfo> convertSoundType(LegacySoundType type, SampleBankInfo bankInfo)
|
||||
{
|
||||
// Todo: This should return the normal SampleInfos if the specified sample file isn't found, but that's a pretty edge-case scenario
|
||||
if (!string.IsNullOrEmpty(bankInfo.Filename))
|
||||
{
|
||||
return new List<SampleInfo>
|
||||
return new List<HitSampleInfo>
|
||||
{
|
||||
new FileSampleInfo
|
||||
new FileHitSampleInfo
|
||||
{
|
||||
Filename = bankInfo.Filename,
|
||||
Volume = bankInfo.Volume
|
||||
@ -327,12 +327,12 @@ namespace osu.Game.Rulesets.Objects.Legacy
|
||||
};
|
||||
}
|
||||
|
||||
var soundTypes = new List<SampleInfo>
|
||||
var soundTypes = new List<HitSampleInfo>
|
||||
{
|
||||
new LegacySampleInfo
|
||||
new LegacyHitSampleInfo
|
||||
{
|
||||
Bank = bankInfo.Normal,
|
||||
Name = SampleInfo.HIT_NORMAL,
|
||||
Name = HitSampleInfo.HIT_NORMAL,
|
||||
Volume = bankInfo.Volume,
|
||||
CustomSampleBank = bankInfo.CustomSampleBank
|
||||
}
|
||||
@ -340,10 +340,10 @@ namespace osu.Game.Rulesets.Objects.Legacy
|
||||
|
||||
if (type.HasFlag(LegacySoundType.Finish))
|
||||
{
|
||||
soundTypes.Add(new LegacySampleInfo
|
||||
soundTypes.Add(new LegacyHitSampleInfo
|
||||
{
|
||||
Bank = bankInfo.Add,
|
||||
Name = SampleInfo.HIT_FINISH,
|
||||
Name = HitSampleInfo.HIT_FINISH,
|
||||
Volume = bankInfo.Volume,
|
||||
CustomSampleBank = bankInfo.CustomSampleBank
|
||||
});
|
||||
@ -351,10 +351,10 @@ namespace osu.Game.Rulesets.Objects.Legacy
|
||||
|
||||
if (type.HasFlag(LegacySoundType.Whistle))
|
||||
{
|
||||
soundTypes.Add(new LegacySampleInfo
|
||||
soundTypes.Add(new LegacyHitSampleInfo
|
||||
{
|
||||
Bank = bankInfo.Add,
|
||||
Name = SampleInfo.HIT_WHISTLE,
|
||||
Name = HitSampleInfo.HIT_WHISTLE,
|
||||
Volume = bankInfo.Volume,
|
||||
CustomSampleBank = bankInfo.CustomSampleBank
|
||||
});
|
||||
@ -362,10 +362,10 @@ namespace osu.Game.Rulesets.Objects.Legacy
|
||||
|
||||
if (type.HasFlag(LegacySoundType.Clap))
|
||||
{
|
||||
soundTypes.Add(new LegacySampleInfo
|
||||
soundTypes.Add(new LegacyHitSampleInfo
|
||||
{
|
||||
Bank = bankInfo.Add,
|
||||
Name = SampleInfo.HIT_CLAP,
|
||||
Name = HitSampleInfo.HIT_CLAP,
|
||||
Volume = bankInfo.Volume,
|
||||
CustomSampleBank = bankInfo.CustomSampleBank
|
||||
});
|
||||
@ -387,7 +387,7 @@ namespace osu.Game.Rulesets.Objects.Legacy
|
||||
public SampleBankInfo Clone() => (SampleBankInfo)MemberwiseClone();
|
||||
}
|
||||
|
||||
private class LegacySampleInfo : SampleInfo
|
||||
private class LegacyHitSampleInfo : HitSampleInfo
|
||||
{
|
||||
public int CustomSampleBank
|
||||
{
|
||||
@ -399,7 +399,7 @@ namespace osu.Game.Rulesets.Objects.Legacy
|
||||
}
|
||||
}
|
||||
|
||||
private class FileSampleInfo : SampleInfo
|
||||
private class FileHitSampleInfo : HitSampleInfo
|
||||
{
|
||||
public string Filename;
|
||||
|
||||
|
Reference in New Issue
Block a user