mirror of
https://github.com/ppy/osu.git
synced 2024-11-06 09:47:52 +08:00
Fade in spm texts.
This commit is contained in:
parent
24187cc53a
commit
ee8746b848
@ -31,7 +31,9 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables
|
|||||||
private readonly Container circleContainer;
|
private readonly Container circleContainer;
|
||||||
private readonly CirclePiece circle;
|
private readonly CirclePiece circle;
|
||||||
private readonly GlowPiece glow;
|
private readonly GlowPiece glow;
|
||||||
private readonly OsuSpriteText spmText;
|
private readonly OsuSpriteText spmText, spmLabel;
|
||||||
|
|
||||||
|
private bool spmShown;
|
||||||
|
|
||||||
private readonly SpriteIcon symbol;
|
private readonly SpriteIcon symbol;
|
||||||
|
|
||||||
@ -113,16 +115,18 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables
|
|||||||
Text = @"0",
|
Text = @"0",
|
||||||
Font = @"Venera",
|
Font = @"Venera",
|
||||||
TextSize = 24,
|
TextSize = 24,
|
||||||
Y = 120
|
Y = 120,
|
||||||
|
Alpha = 0
|
||||||
},
|
},
|
||||||
new OsuSpriteText
|
spmLabel = new OsuSpriteText
|
||||||
{
|
{
|
||||||
Anchor = Anchor.Centre,
|
Anchor = Anchor.Centre,
|
||||||
Origin = Anchor.TopCentre,
|
Origin = Anchor.TopCentre,
|
||||||
Text = @"SPINS PER MINUTE",
|
Text = @"SPINS PER MINUTE",
|
||||||
Font = @"Venera",
|
Font = @"Venera",
|
||||||
TextSize = 12,
|
TextSize = 12,
|
||||||
Y = 125
|
Y = 125,
|
||||||
|
Alpha = 0
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
@ -178,6 +182,12 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables
|
|||||||
protected override void Update()
|
protected override void Update()
|
||||||
{
|
{
|
||||||
disc.Tracking = OsuActionInputManager.PressedActions.Any(x => x == OsuAction.LeftButton || x == OsuAction.RightButton);
|
disc.Tracking = OsuActionInputManager.PressedActions.Any(x => x == OsuAction.LeftButton || x == OsuAction.RightButton);
|
||||||
|
if (!spmShown && disc.Tracking)
|
||||||
|
{
|
||||||
|
spmShown = true;
|
||||||
|
spmText.FadeIn(TIME_FADEIN);
|
||||||
|
spmLabel.FadeIn(TIME_FADEIN);
|
||||||
|
}
|
||||||
|
|
||||||
base.Update();
|
base.Update();
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user