From 608596c3b39a83d61fa21d30dd92eab4334bfee5 Mon Sep 17 00:00:00 2001 From: Craftplacer Date: Fri, 24 Apr 2020 02:50:10 +0200 Subject: [PATCH] Rename DefaultTaikoDonTextureAnimation to TaikoDonTextureAnimation --- .../UI/DrawableTaikoCharacter.cs | 14 ++++++-------- ...ureAnimation.cs => TaikoDonTextureAnimation.cs} | 11 ++++++----- 2 files changed, 12 insertions(+), 13 deletions(-) rename osu.Game.Rulesets.Taiko/UI/{DefaultTaikoDonTextureAnimation.cs => TaikoDonTextureAnimation.cs} (79%) diff --git a/osu.Game.Rulesets.Taiko/UI/DrawableTaikoCharacter.cs b/osu.Game.Rulesets.Taiko/UI/DrawableTaikoCharacter.cs index 897670d049..85f18b3ec7 100644 --- a/osu.Game.Rulesets.Taiko/UI/DrawableTaikoCharacter.cs +++ b/osu.Game.Rulesets.Taiko/UI/DrawableTaikoCharacter.cs @@ -1,16 +1,14 @@ using osu.Framework.Allocation; using osu.Framework.Audio.Track; -using osu.Framework.Graphics; using osu.Framework.Graphics.Textures; using osu.Game.Beatmaps.ControlPoints; using osu.Game.Graphics.Containers; -using osuTK; namespace osu.Game.Rulesets.Taiko.UI { public sealed class DrawableTaikoCharacter : BeatSyncedContainer { - private static DefaultTaikoDonTextureAnimation idleDrawable, clearDrawable, kiaiDrawable, failDrawable; + private static TaikoDonTextureAnimation idleDrawable, clearDrawable, kiaiDrawable, failDrawable; private TaikoDonAnimationState state; @@ -22,7 +20,7 @@ namespace osu.Game.Rulesets.Taiko.UI var xd = new Vector2(1); } - private DefaultTaikoDonTextureAnimation getStateDrawable() => State switch + private TaikoDonTextureAnimation getStateDrawable() => State switch { TaikoDonAnimationState.Idle => idleDrawable, TaikoDonAnimationState.Clear => clearDrawable, @@ -50,10 +48,10 @@ namespace osu.Game.Rulesets.Taiko.UI { InternalChildren = new[] { - idleDrawable = new DefaultTaikoDonTextureAnimation(TaikoDonAnimationState.Idle), - clearDrawable = new DefaultTaikoDonTextureAnimation(TaikoDonAnimationState.Clear), - kiaiDrawable = new DefaultTaikoDonTextureAnimation(TaikoDonAnimationState.Kiai), - failDrawable = new DefaultTaikoDonTextureAnimation(TaikoDonAnimationState.Fail), + idleDrawable = new TaikoDonTextureAnimation(TaikoDonAnimationState.Idle), + clearDrawable = new TaikoDonTextureAnimation(TaikoDonAnimationState.Clear), + kiaiDrawable = new TaikoDonTextureAnimation(TaikoDonAnimationState.Kiai), + failDrawable = new TaikoDonTextureAnimation(TaikoDonAnimationState.Fail), }; // sets the state, to make sure we have the correct sprite loaded and set. diff --git a/osu.Game.Rulesets.Taiko/UI/DefaultTaikoDonTextureAnimation.cs b/osu.Game.Rulesets.Taiko/UI/TaikoDonTextureAnimation.cs similarity index 79% rename from osu.Game.Rulesets.Taiko/UI/DefaultTaikoDonTextureAnimation.cs rename to osu.Game.Rulesets.Taiko/UI/TaikoDonTextureAnimation.cs index 1fefed953d..315cd57f13 100644 --- a/osu.Game.Rulesets.Taiko/UI/DefaultTaikoDonTextureAnimation.cs +++ b/osu.Game.Rulesets.Taiko/UI/TaikoDonTextureAnimation.cs @@ -6,18 +6,19 @@ using osu.Game.Skinning; namespace osu.Game.Rulesets.Taiko.UI { - public sealed class DefaultTaikoDonTextureAnimation : TextureAnimation + public sealed class TaikoDonTextureAnimation : TextureAnimation { - private readonly TaikoDonAnimationState _state; + private readonly TaikoDonAnimationState state; private int currentFrame; - public DefaultTaikoDonTextureAnimation(TaikoDonAnimationState state) : base(false) + public TaikoDonTextureAnimation(TaikoDonAnimationState state) : base(false) { - _state = state; + this.state = state; this.Stop(); Origin = Anchor.BottomLeft; Anchor = Anchor.BottomLeft; + AutoSizeAxes = Axes.Y; } [BackgroundDependencyLoader] @@ -25,7 +26,7 @@ namespace osu.Game.Rulesets.Taiko.UI { for (int i = 0;; i++) { - var textureName = $"pippidon{_getStateString(_state)}{i}"; + var textureName = $"pippidon{_getStateString(state)}{i}"; Texture texture = skin.GetTexture(textureName); if (texture == null)