Add legacy judgement implementation which doesn't transform on animations

This commit is contained in:
Dean Herbert
2020-11-17 15:44:15 +09:00
parent 8247e6ce91
commit dd4b69feab
2 changed files with 81 additions and 14 deletions

View File

@ -371,20 +371,9 @@ namespace osu.Game.Skinning
}
case GameplaySkinComponent<HitResult> resultComponent:
switch (resultComponent.Component)
{
case HitResult.Miss:
return this.GetAnimation("hit0", true, false);
case HitResult.Meh:
return this.GetAnimation("hit50", true, false);
case HitResult.Ok:
return this.GetAnimation("hit100", true, false);
case HitResult.Great:
return this.GetAnimation("hit300", true, false);
}
var drawable = getJudgementAnimation(resultComponent.Component);
if (drawable != null)
return new LegacyJudgementPiece(resultComponent.Component, drawable);
break;
}
@ -392,6 +381,26 @@ namespace osu.Game.Skinning
return this.GetAnimation(component.LookupName, false, false);
}
private Drawable getJudgementAnimation(HitResult result)
{
switch (result)
{
case HitResult.Miss:
return this.GetAnimation("hit0", true, false);
case HitResult.Meh:
return this.GetAnimation("hit50", true, false);
case HitResult.Ok:
return this.GetAnimation("hit100", true, false);
case HitResult.Great:
return this.GetAnimation("hit300", true, false);
}
return null;
}
public override Texture GetTexture(string componentName, WrapMode wrapModeS, WrapMode wrapModeT)
{
foreach (var name in getFallbackNames(componentName))