1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-06 06:57:39 +08:00

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 @@ namespace osu.Game.Rulesets.Taiko.UI
{
RelativeSizeAxes = Axes.Both;
PlayfieldState = new Bindable<TaikoMascotAnimationState>();
PlayfieldState.BindValueChanged((b) =>
PlayfieldState.BindValueChanged(b =>
{
if (lastEffectControlPoint != null)
State = getFinalAnimationState(lastEffectControlPoint, b.NewValue);
@ -50,14 +50,17 @@ namespace osu.Game.Rulesets.Taiko.UI
State = startingState;
}
private TaikoMascotTextureAnimation getStateDrawable(TaikoMascotAnimationState state) => state switch
private TaikoMascotTextureAnimation getStateDrawable(TaikoMascotAnimationState state)
{
TaikoMascotAnimationState.Idle => idleDrawable,
TaikoMascotAnimationState.Clear => clearDrawable,
TaikoMascotAnimationState.Kiai => kiaiDrawable,
TaikoMascotAnimationState.Fail => failDrawable,
_ => null
};
return state switch
{
TaikoMascotAnimationState.Idle => idleDrawable,
TaikoMascotAnimationState.Clear => clearDrawable,
TaikoMascotAnimationState.Kiai => kiaiDrawable,
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,13 +76,16 @@ namespace osu.Game.Rulesets.Taiko.UI
private string _getStateTextureName(int i) => $"pippidon{_getStateString(State)}{i}";
private string _getStateString(TaikoMascotAnimationState state) => state switch
private string _getStateString(TaikoMascotAnimationState state)
{
TaikoMascotAnimationState.Clear => "clear",
TaikoMascotAnimationState.Fail => "fail",
TaikoMascotAnimationState.Idle => "idle",
TaikoMascotAnimationState.Kiai => "kiai",
_ => null
};
return state switch
{
TaikoMascotAnimationState.Clear => "clear",
TaikoMascotAnimationState.Fail => "fail",
TaikoMascotAnimationState.Idle => "idle",
TaikoMascotAnimationState.Kiai => "kiai",
_ => null
};
}
}
}