Skip to content

Commit

Permalink
Split out into own method
Browse files Browse the repository at this point in the history
  • Loading branch information
peppy committed Dec 27, 2019
1 parent 380c316 commit cfa1dfa
Showing 1 changed file with 21 additions and 16 deletions.
37 changes: 21 additions & 16 deletions osu.Game.Rulesets.Mania/Skinning/ManiaLegacySkinTransformer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,28 +25,33 @@ public Drawable GetDrawableComponent(ISkinComponent component)
switch (component)
{
case GameplaySkinComponent<HitResult> resultComponent:
switch (resultComponent.Component)
{
case HitResult.Miss:
return this.GetAnimation("mania-hit0", true, true);
return getResult(resultComponent);
}

return null;
}

case HitResult.Meh:
return this.GetAnimation("mania-hit50", true, true);
private Drawable getResult(GameplaySkinComponent<HitResult> resultComponent)
{
switch (resultComponent.Component)
{
case HitResult.Miss:
return this.GetAnimation("mania-hit0", true, true);

case HitResult.Ok:
return this.GetAnimation("mania-hit100", true, true);
case HitResult.Meh:
return this.GetAnimation("mania-hit50", true, true);

case HitResult.Good:
return this.GetAnimation("mania-hit200", true, true);
case HitResult.Ok:
return this.GetAnimation("mania-hit100", true, true);

case HitResult.Great:
return this.GetAnimation("mania-hit300", true, true);
case HitResult.Good:
return this.GetAnimation("mania-hit200", true, true);

case HitResult.Perfect:
return this.GetAnimation("mania-hit300g", true, true);
}
case HitResult.Great:
return this.GetAnimation("mania-hit300", true, true);

break;
case HitResult.Perfect:
return this.GetAnimation("mania-hit300g", true, true);
}

return null;
Expand Down

0 comments on commit cfa1dfa

Please sign in to comment.