1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-14 02:22:59 +08:00

Better judgement visualisations in testcase

This commit is contained in:
smoogipoo 2018-01-30 18:10:14 +09:00
parent cd4a0612c0
commit 00001364c3

View File

@ -150,6 +150,7 @@ namespace osu.Game.Rulesets.Osu.Tests
Add(drawable);
}
private float judgementOffsetDirection = 1;
private void onJudgement(DrawableHitObject judgedObject, Judgement judgement)
{
var osuObject = judgedObject as DrawableOsuHitObject;
@ -164,12 +165,14 @@ namespace osu.Game.Rulesets.Osu.Tests
Text = judgement.IsHit ? "Hit!" : "Miss!",
Colour = judgement.IsHit ? Color4.Green : Color4.Red,
TextSize = 30,
Position = osuObject.HitObject.StackedEndPosition - new Vector2(0, 45)
Position = osuObject.HitObject.StackedEndPosition + judgementOffsetDirection * new Vector2(0, 45)
});
text.Delay(150)
.Then().FadeOut(200)
.Then().Expire();
judgementOffsetDirection *= -1;
}
}
}