Fix formatting

This commit is contained in:
Craftplacer 2020-04-24 07:09:20 +02:00
parent dbf39be607
commit ac44185f09
2 changed files with 22 additions and 16 deletions

View File

@ -41,7 +41,7 @@ public DrawableTaikoMascot(TaikoMascotAnimationState startingState = TaikoMascot
{
RelativeSizeAxes = Axes.Both;
PlayfieldState = new Bindable<TaikoMascotAnimationState>();
PlayfieldState.BindValueChanged((b) =>
PlayfieldState.BindValueChanged(b =>
{
if (lastEffectControlPoint != null)
State = getFinalAnimationState(lastEffectControlPoint, b.NewValue);
@ -50,7 +50,9 @@ public DrawableTaikoMascot(TaikoMascotAnimationState startingState = TaikoMascot
State = startingState;
}
private TaikoMascotTextureAnimation getStateDrawable(TaikoMascotAnimationState state) => state switch
private TaikoMascotTextureAnimation getStateDrawable(TaikoMascotAnimationState state)
{
return state switch
{
TaikoMascotAnimationState.Idle => idleDrawable,
TaikoMascotAnimationState.Clear => clearDrawable,
@ -58,6 +60,7 @@ public DrawableTaikoMascot(TaikoMascotAnimationState startingState = TaikoMascot
TaikoMascotAnimationState.Fail => failDrawable,
_ => null
};
}
private TaikoMascotAnimationState getFinalAnimationState(EffectControlPoint effectPoint, TaikoMascotAnimationState playfieldState)
{

View File

@ -9,7 +9,7 @@ namespace osu.Game.Rulesets.Taiko.UI
public sealed class TaikoMascotTextureAnimation : TextureAnimation
{
private const float clear_animation_speed = 1000 / 10F;
private static readonly int[] clear_animation_sequence = new[] { 0, 1, 2, 3, 4, 5, 6, 5, 6, 5, 4, 3, 2, 1, 0 };
private static readonly int[] clear_animation_sequence = { 0, 1, 2, 3, 4, 5, 6, 5, 6, 5, 4, 3, 2, 1, 0 };
private int currentFrame;
public TaikoMascotAnimationState State { get; }
@ -76,7 +76,9 @@ public void Move()
private string _getStateTextureName(int i) => $"pippidon{_getStateString(State)}{i}";
private string _getStateString(TaikoMascotAnimationState state) => state switch
private string _getStateString(TaikoMascotAnimationState state)
{
return state switch
{
TaikoMascotAnimationState.Clear => "clear",
TaikoMascotAnimationState.Fail => "fail",
@ -86,3 +88,4 @@ public void Move()
};
}
}
}