mirror of
https://github.com/osukey/osukey.git
synced 2025-08-07 00:23:59 +09:00
Move judgement text to internal container
This commit is contained in:
@ -30,10 +30,11 @@ namespace osu.Game.Rulesets.Mania.UI
|
|||||||
|
|
||||||
if (Result.IsHit)
|
if (Result.IsHit)
|
||||||
{
|
{
|
||||||
this.ScaleTo(0.8f);
|
JudgementBody.ScaleTo(0.8f);
|
||||||
this.ScaleTo(1, 250, Easing.OutElastic);
|
JudgementBody.ScaleTo(1, 250, Easing.OutElastic);
|
||||||
|
|
||||||
this.Delay(50).FadeOut(200).ScaleTo(0.75f, 250);
|
JudgementBody.Delay(50).ScaleTo(0.75f, 250);
|
||||||
|
this.Delay(50).FadeOut(200);
|
||||||
}
|
}
|
||||||
|
|
||||||
Expire();
|
Expire();
|
||||||
|
@ -31,10 +31,10 @@ namespace osu.Game.Rulesets.Taiko.UI
|
|||||||
switch (Result.Type)
|
switch (Result.Type)
|
||||||
{
|
{
|
||||||
case HitResult.Good:
|
case HitResult.Good:
|
||||||
Colour = colours.GreenLight;
|
JudgementBody.Colour = colours.GreenLight;
|
||||||
break;
|
break;
|
||||||
case HitResult.Great:
|
case HitResult.Great:
|
||||||
Colour = colours.BlueLight;
|
JudgementBody.Colour = colours.BlueLight;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -19,7 +19,7 @@ namespace osu.Game.Rulesets.Judgements
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// A drawable object which visualises the hit result of a <see cref="Judgements.Judgement"/>.
|
/// A drawable object which visualises the hit result of a <see cref="Judgements.Judgement"/>.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public class DrawableJudgement : Container
|
public class DrawableJudgement : CompositeDrawable
|
||||||
{
|
{
|
||||||
private const float judgement_size = 80;
|
private const float judgement_size = 80;
|
||||||
|
|
||||||
@ -29,6 +29,7 @@ namespace osu.Game.Rulesets.Judgements
|
|||||||
|
|
||||||
public readonly DrawableHitObject JudgedObject;
|
public readonly DrawableHitObject JudgedObject;
|
||||||
|
|
||||||
|
protected Container JudgementBody;
|
||||||
protected SpriteText JudgementText;
|
protected SpriteText JudgementText;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@ -49,14 +50,20 @@ namespace osu.Game.Rulesets.Judgements
|
|||||||
{
|
{
|
||||||
this.colours = colours;
|
this.colours = colours;
|
||||||
|
|
||||||
Child = new SkinnableDrawable($"Play/{Result.Type}", _ => JudgementText = new OsuSpriteText
|
InternalChild = JudgementBody = new Container
|
||||||
{
|
{
|
||||||
Text = Result.Type.GetDescription().ToUpperInvariant(),
|
Anchor = Anchor.Centre,
|
||||||
Font = @"Venera",
|
Origin = Anchor.Centre,
|
||||||
Colour = judgementColour(Result.Type),
|
|
||||||
Scale = new Vector2(0.85f, 1),
|
Child = new SkinnableDrawable($"Play/{Result.Type}", _ => JudgementText = new OsuSpriteText
|
||||||
TextSize = 12
|
{
|
||||||
}, restrictSize: false);
|
Text = Result.Type.GetDescription().ToUpperInvariant(),
|
||||||
|
Font = @"Venera",
|
||||||
|
Colour = judgementColour(Result.Type),
|
||||||
|
Scale = new Vector2(0.85f, 1),
|
||||||
|
TextSize = 12
|
||||||
|
}, restrictSize: false)
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override void LoadComplete()
|
protected override void LoadComplete()
|
||||||
@ -65,24 +72,22 @@ namespace osu.Game.Rulesets.Judgements
|
|||||||
|
|
||||||
this.FadeInFromZero(100, Easing.OutQuint);
|
this.FadeInFromZero(100, Easing.OutQuint);
|
||||||
|
|
||||||
var origScale = Scale;
|
|
||||||
|
|
||||||
switch (Result.Type)
|
switch (Result.Type)
|
||||||
{
|
{
|
||||||
case HitResult.None:
|
case HitResult.None:
|
||||||
break;
|
break;
|
||||||
case HitResult.Miss:
|
case HitResult.Miss:
|
||||||
this.ScaleTo(origScale * 1.6f);
|
JudgementBody.ScaleTo(1.6f);
|
||||||
this.ScaleTo(origScale, 100, Easing.In);
|
JudgementBody.ScaleTo(1, 100, Easing.In);
|
||||||
|
|
||||||
this.MoveToOffset(new Vector2(0, 100), 800, Easing.InQuint);
|
JudgementBody.MoveToOffset(new Vector2(0, 100), 800, Easing.InQuint);
|
||||||
this.RotateTo(40, 800, Easing.InQuint);
|
JudgementBody.RotateTo(40, 800, Easing.InQuint);
|
||||||
|
|
||||||
this.Delay(600).FadeOut(200);
|
this.Delay(600).FadeOut(200);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
this.ScaleTo(origScale * 0.9f);
|
JudgementBody.ScaleTo(0.9f);
|
||||||
this.ScaleTo(origScale, 500, Easing.OutElastic);
|
JudgementBody.ScaleTo(1, 500, Easing.OutElastic);
|
||||||
|
|
||||||
this.Delay(100).FadeOut(400);
|
this.Delay(100).FadeOut(400);
|
||||||
break;
|
break;
|
||||||
@ -105,9 +110,9 @@ namespace osu.Game.Rulesets.Judgements
|
|||||||
return colours.Yellow;
|
return colours.Yellow;
|
||||||
case HitResult.Miss:
|
case HitResult.Miss:
|
||||||
return colours.Red;
|
return colours.Red;
|
||||||
|
default:
|
||||||
|
return Color4.White;
|
||||||
}
|
}
|
||||||
|
|
||||||
return Color4.White;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user