1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-11 14:17:26 +08:00
osu-lazer/osu.Game/Skinning/ArgonProSkin.cs

51 lines
1.7 KiB
C#
Raw Normal View History

2022-12-12 14:52:29 +08:00
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
using JetBrains.Annotations;
using osu.Framework.Audio.Sample;
using osu.Game.Audio;
using osu.Game.Extensions;
using osu.Game.IO;
namespace osu.Game.Skinning
{
public class ArgonProSkin : ArgonSkin
{
public new static SkinInfo CreateInfo() => new SkinInfo
{
ID = Skinning.SkinInfo.ARGON_PRO_SKIN,
Name = "osu! \"argon\" pro (2022)",
Creator = "team osu!",
Protected = true,
InstantiationInfo = typeof(ArgonProSkin).GetInvariantInstantiationInfo()
};
public override ISample? GetSample(ISampleInfo sampleInfo)
{
foreach (string lookup in sampleInfo.LookupNames)
{
2024-03-08 20:43:18 +08:00
var sample = Samples?.Get(lookup)
?? Resources.AudioManager?.Samples.Get(lookup.Replace(@"Gameplay/", @"Gameplay/ArgonPro/"))
?? Resources.AudioManager?.Samples.Get(lookup.Replace(@"Gameplay/", @"Gameplay/Argon/"))
?? Resources.AudioManager?.Samples.Get(lookup);
2022-12-12 14:52:29 +08:00
if (sample != null)
return sample;
}
return null;
}
public ArgonProSkin(IStorageResourceProvider resources)
: this(CreateInfo(), resources)
{
}
[UsedImplicitly(ImplicitUseKindFlags.InstantiatedWithFixedConstructorSignature)]
public ArgonProSkin(SkinInfo skin, IStorageResourceProvider resources)
: base(skin, resources)
{
}
}
}