mirror of
https://github.com/ppy/osu.git
synced 2025-01-06 07:42:55 +08:00
Adjust exceptions and fix capitalisation
This commit is contained in:
parent
f387fe310f
commit
84641765c5
@ -1,6 +1,7 @@
|
|||||||
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
// 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.
|
// See the LICENCE file in the repository root for full licence text.
|
||||||
|
|
||||||
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using osu.Framework.Audio.Sample;
|
using osu.Framework.Audio.Sample;
|
||||||
using osu.Framework.Bindables;
|
using osu.Framework.Bindables;
|
||||||
@ -86,7 +87,7 @@ namespace osu.Game.Rulesets.Taiko.Skinning
|
|||||||
case TaikoSkinComponents.TaikoExplosionGreat:
|
case TaikoSkinComponents.TaikoExplosionGreat:
|
||||||
case TaikoSkinComponents.TaikoExplosionMiss:
|
case TaikoSkinComponents.TaikoExplosionMiss:
|
||||||
|
|
||||||
var sprite = this.GetAnimation(getHitname(taikoComponent.Component), true, false);
|
var sprite = this.GetAnimation(getHitName(taikoComponent.Component), true, false);
|
||||||
if (sprite != null)
|
if (sprite != null)
|
||||||
return new LegacyHitExplosion(sprite);
|
return new LegacyHitExplosion(sprite);
|
||||||
|
|
||||||
@ -96,7 +97,7 @@ namespace osu.Game.Rulesets.Taiko.Skinning
|
|||||||
return source.GetDrawableComponent(component);
|
return source.GetDrawableComponent(component);
|
||||||
}
|
}
|
||||||
|
|
||||||
private string getHitname(TaikoSkinComponents component)
|
private string getHitName(TaikoSkinComponents component)
|
||||||
{
|
{
|
||||||
switch (component)
|
switch (component)
|
||||||
{
|
{
|
||||||
@ -110,7 +111,7 @@ namespace osu.Game.Rulesets.Taiko.Skinning
|
|||||||
return "taiko-hit300";
|
return "taiko-hit300";
|
||||||
}
|
}
|
||||||
|
|
||||||
return string.Empty;
|
throw new ArgumentOutOfRangeException(nameof(component), "Invalid result type");
|
||||||
}
|
}
|
||||||
|
|
||||||
public Texture GetTexture(string componentName) => source.GetTexture(componentName);
|
public Texture GetTexture(string componentName) => source.GetTexture(componentName);
|
||||||
|
@ -56,7 +56,7 @@ namespace osu.Game.Rulesets.Taiko.UI
|
|||||||
return TaikoSkinComponents.TaikoExplosionGreat;
|
return TaikoSkinComponents.TaikoExplosionGreat;
|
||||||
}
|
}
|
||||||
|
|
||||||
throw new ArgumentException("Invalid result type", nameof(resultType));
|
throw new ArgumentOutOfRangeException(nameof(resultType), "Invalid result type");
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override void LoadComplete()
|
protected override void LoadComplete()
|
||||||
|
Loading…
Reference in New Issue
Block a user