mirror of
https://github.com/ppy/osu.git
synced 2025-01-12 16:43:00 +08:00
Rename DefaultTaikoDonTextureAnimation to TaikoDonTextureAnimation
This commit is contained in:
parent
8446fa98b5
commit
608596c3b3
@ -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.
|
||||
|
@ -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)
|
Loading…
Reference in New Issue
Block a user