mirror of
https://github.com/osukey/osukey.git
synced 2025-08-07 16:43:52 +09:00
Tidy up and tweak transitions of DrawableJudgementInfo.
This commit is contained in:
@ -44,16 +44,14 @@ namespace osu.Game.Modes.Taiko.UI
|
|||||||
|
|
||||||
protected override void LoadComplete()
|
protected override void LoadComplete()
|
||||||
{
|
{
|
||||||
base.LoadComplete();
|
switch (Judgement.Result)
|
||||||
|
|
||||||
if (Judgement.Result == HitResult.Hit)
|
|
||||||
{
|
{
|
||||||
|
case HitResult.Hit:
|
||||||
MoveToY(-100, 500);
|
MoveToY(-100, 500);
|
||||||
Delay(250);
|
break;
|
||||||
FadeOut(250);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Expire();
|
base.LoadComplete();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -179,19 +179,17 @@ namespace osu.Game.Modes.Taiko.UI
|
|||||||
|
|
||||||
public override void OnJudgement(DrawableHitObject<TaikoHitObject, TaikoJudgementInfo> judgedObject)
|
public override void OnJudgement(DrawableHitObject<TaikoHitObject, TaikoJudgementInfo> judgedObject)
|
||||||
{
|
{
|
||||||
if (judgedObject.Judgement.Result == HitResult.Hit)
|
bool wasHit = judgedObject.Judgement.Result == HitResult.Hit;
|
||||||
{
|
|
||||||
hitExplosionContainer.Add(new HitExplosion(judgedObject.Judgement));
|
|
||||||
}
|
|
||||||
|
|
||||||
float judgementOffset = judgedObject.Judgement.Result == HitResult.Hit ? judgedObject.Position.X : 0;
|
if (wasHit)
|
||||||
|
hitExplosionContainer.Add(new HitExplosion(judgedObject.Judgement));
|
||||||
|
|
||||||
judgementContainer.Add(new DrawableTaikoJudgementInfo(judgedObject.Judgement)
|
judgementContainer.Add(new DrawableTaikoJudgementInfo(judgedObject.Judgement)
|
||||||
{
|
{
|
||||||
Anchor = judgedObject.Judgement.Result == HitResult.Hit ? Anchor.TopLeft : Anchor.BottomLeft,
|
Anchor = wasHit ? Anchor.TopLeft : Anchor.CentreLeft,
|
||||||
Origin = judgedObject.Judgement.Result == HitResult.Hit ? Anchor.BottomCentre : Anchor.TopCentre,
|
Origin = wasHit ? Anchor.BottomCentre : Anchor.Centre,
|
||||||
RelativePositionAxes = Axes.X,
|
RelativePositionAxes = Axes.X,
|
||||||
X = judgementOffset,
|
X = wasHit ? judgedObject.Position.X : 0,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -25,6 +25,8 @@ namespace osu.Game.Modes.Judgements
|
|||||||
|
|
||||||
protected readonly SpriteText JudgementText;
|
protected readonly SpriteText JudgementText;
|
||||||
|
|
||||||
|
protected double HitVisibleLength => 600;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Creates a drawable which visualises a <see cref="JudgementInfo"/>.
|
/// Creates a drawable which visualises a <see cref="JudgementInfo"/>.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@ -65,10 +67,11 @@ namespace osu.Game.Modes.Judgements
|
|||||||
{
|
{
|
||||||
base.LoadComplete();
|
base.LoadComplete();
|
||||||
|
|
||||||
if (Judgement.Result == HitResult.Miss)
|
FadeInFromZero(100, EasingTypes.OutQuint);
|
||||||
{
|
|
||||||
FadeInFromZero(60);
|
|
||||||
|
|
||||||
|
switch (Judgement.Result)
|
||||||
|
{
|
||||||
|
case HitResult.Miss:
|
||||||
ScaleTo(1.6f);
|
ScaleTo(1.6f);
|
||||||
ScaleTo(1, 100, EasingTypes.In);
|
ScaleTo(1, 100, EasingTypes.In);
|
||||||
|
|
||||||
@ -77,6 +80,14 @@ namespace osu.Game.Modes.Judgements
|
|||||||
|
|
||||||
Delay(600);
|
Delay(600);
|
||||||
FadeOut(200);
|
FadeOut(200);
|
||||||
|
break;
|
||||||
|
case HitResult.Hit:
|
||||||
|
ScaleTo(0.9f);
|
||||||
|
ScaleTo(1, 500, EasingTypes.OutElastic);
|
||||||
|
|
||||||
|
Delay(250);
|
||||||
|
FadeOut(250, EasingTypes.OutQuint);
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
Expire();
|
Expire();
|
||||||
|
Reference in New Issue
Block a user