mirror of
https://github.com/ppy/osu.git
synced 2025-01-12 19:03:08 +08:00
Fix formatting
This commit is contained in:
parent
dbf39be607
commit
ac44185f09
@ -41,7 +41,7 @@ namespace osu.Game.Rulesets.Taiko.UI
|
|||||||
{
|
{
|
||||||
RelativeSizeAxes = Axes.Both;
|
RelativeSizeAxes = Axes.Both;
|
||||||
PlayfieldState = new Bindable<TaikoMascotAnimationState>();
|
PlayfieldState = new Bindable<TaikoMascotAnimationState>();
|
||||||
PlayfieldState.BindValueChanged((b) =>
|
PlayfieldState.BindValueChanged(b =>
|
||||||
{
|
{
|
||||||
if (lastEffectControlPoint != null)
|
if (lastEffectControlPoint != null)
|
||||||
State = getFinalAnimationState(lastEffectControlPoint, b.NewValue);
|
State = getFinalAnimationState(lastEffectControlPoint, b.NewValue);
|
||||||
@ -50,14 +50,17 @@ namespace osu.Game.Rulesets.Taiko.UI
|
|||||||
State = startingState;
|
State = startingState;
|
||||||
}
|
}
|
||||||
|
|
||||||
private TaikoMascotTextureAnimation getStateDrawable(TaikoMascotAnimationState state) => state switch
|
private TaikoMascotTextureAnimation getStateDrawable(TaikoMascotAnimationState state)
|
||||||
{
|
{
|
||||||
TaikoMascotAnimationState.Idle => idleDrawable,
|
return state switch
|
||||||
TaikoMascotAnimationState.Clear => clearDrawable,
|
{
|
||||||
TaikoMascotAnimationState.Kiai => kiaiDrawable,
|
TaikoMascotAnimationState.Idle => idleDrawable,
|
||||||
TaikoMascotAnimationState.Fail => failDrawable,
|
TaikoMascotAnimationState.Clear => clearDrawable,
|
||||||
_ => null
|
TaikoMascotAnimationState.Kiai => kiaiDrawable,
|
||||||
};
|
TaikoMascotAnimationState.Fail => failDrawable,
|
||||||
|
_ => null
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
private TaikoMascotAnimationState getFinalAnimationState(EffectControlPoint effectPoint, TaikoMascotAnimationState playfieldState)
|
private TaikoMascotAnimationState getFinalAnimationState(EffectControlPoint effectPoint, TaikoMascotAnimationState playfieldState)
|
||||||
{
|
{
|
||||||
|
@ -9,7 +9,7 @@ namespace osu.Game.Rulesets.Taiko.UI
|
|||||||
public sealed class TaikoMascotTextureAnimation : TextureAnimation
|
public sealed class TaikoMascotTextureAnimation : TextureAnimation
|
||||||
{
|
{
|
||||||
private const float clear_animation_speed = 1000 / 10F;
|
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;
|
private int currentFrame;
|
||||||
|
|
||||||
public TaikoMascotAnimationState State { get; }
|
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 _getStateTextureName(int i) => $"pippidon{_getStateString(State)}{i}";
|
||||||
|
|
||||||
private string _getStateString(TaikoMascotAnimationState state) => state switch
|
private string _getStateString(TaikoMascotAnimationState state)
|
||||||
{
|
{
|
||||||
TaikoMascotAnimationState.Clear => "clear",
|
return state switch
|
||||||
TaikoMascotAnimationState.Fail => "fail",
|
{
|
||||||
TaikoMascotAnimationState.Idle => "idle",
|
TaikoMascotAnimationState.Clear => "clear",
|
||||||
TaikoMascotAnimationState.Kiai => "kiai",
|
TaikoMascotAnimationState.Fail => "fail",
|
||||||
_ => null
|
TaikoMascotAnimationState.Idle => "idle",
|
||||||
};
|
TaikoMascotAnimationState.Kiai => "kiai",
|
||||||
|
_ => null
|
||||||
|
};
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user