mirror of
https://github.com/osukey/osukey.git
synced 2025-08-02 22:26:41 +09:00
Add basic flow for hitobject judgement.
This commit is contained in:
@ -39,7 +39,9 @@ namespace osu.Game.Modes.Osu.Objects.Drawables
|
||||
circle = new CirclePiece
|
||||
{
|
||||
Colour = osuObject.Colour,
|
||||
Hit = Hit,
|
||||
Hit = () => Hit(new JudgementInfo {
|
||||
UserTriggered = true,
|
||||
}),
|
||||
},
|
||||
number = new NumberPiece(),
|
||||
ring = new RingPiece(),
|
||||
@ -73,7 +75,7 @@ namespace osu.Game.Modes.Osu.Objects.Drawables
|
||||
Flush(true); //move to DrawableHitObject
|
||||
ApproachCircle.Flush(true);
|
||||
|
||||
double t = HitTime ?? osuObject.StartTime;
|
||||
double t = osuObject.EndTime + (Judgement?.TimeOffset ?? 0);
|
||||
|
||||
Alpha = 0;
|
||||
|
||||
@ -103,14 +105,26 @@ namespace osu.Game.Modes.Osu.Objects.Drawables
|
||||
|
||||
switch (state)
|
||||
{
|
||||
case ArmedState.Disarmed:
|
||||
Delay(osuObject.Duration + 200);
|
||||
FadeOut(200);
|
||||
case ArmedState.Idle:
|
||||
Delay(osuObject.Duration + 500);
|
||||
FadeOut(500);
|
||||
|
||||
explosion?.Expire();
|
||||
explosion = null;
|
||||
break;
|
||||
case ArmedState.Armed:
|
||||
case ArmedState.Miss:
|
||||
ring.FadeOut();
|
||||
circle.FadeOut();
|
||||
number.FadeOut();
|
||||
|
||||
explosion?.Expire();
|
||||
explosion = null;
|
||||
|
||||
Schedule(() => Add(explosion = new HitExplosion(HitResult.Miss)));
|
||||
|
||||
FadeOut(800);
|
||||
break;
|
||||
case ArmedState.Hit:
|
||||
const double flash_in = 30;
|
||||
|
||||
flash.FadeTo(0.8f, flash_in);
|
||||
@ -119,7 +133,7 @@ namespace osu.Game.Modes.Osu.Objects.Drawables
|
||||
|
||||
explode.FadeIn(flash_in);
|
||||
|
||||
Schedule(() => Add(explosion = new HitExplosion(Judgement.Hit300)));
|
||||
Schedule(() => Add(explosion = new HitExplosion(Judgement.Result)));
|
||||
|
||||
Delay(flash_in, true);
|
||||
|
||||
|
@ -18,7 +18,7 @@ namespace osu.Game.Modes.Osu.Objects.Drawables
|
||||
Add(new CirclePiece
|
||||
{
|
||||
Colour = h.Colour,
|
||||
Hit = Hit,
|
||||
Hit = () => Hit(new JudgementInfo()),
|
||||
Position = h.Curve.PositionAt(i) - h.Position //non-relative?
|
||||
});
|
||||
}
|
||||
|
@ -12,7 +12,7 @@ namespace osu.Game.Modes.Osu.Objects.Drawables
|
||||
private SpriteText line1;
|
||||
private SpriteText line2;
|
||||
|
||||
public HitExplosion(Judgement judgement, ComboJudgement comboJudgement = ComboJudgement.None)
|
||||
public HitExplosion(HitResult hitResult, ComboResult comboResult = ComboResult.None)
|
||||
{
|
||||
AutoSizeAxes = Axes.Both;
|
||||
Anchor = Anchor.Centre;
|
||||
@ -27,13 +27,13 @@ namespace osu.Game.Modes.Osu.Objects.Drawables
|
||||
{
|
||||
Anchor = Anchor.TopCentre,
|
||||
Origin = Anchor.TopCentre,
|
||||
Text = judgement.GetDescription(),
|
||||
Text = hitResult.GetDescription(),
|
||||
Font = @"Venera",
|
||||
TextSize = 20,
|
||||
},
|
||||
line2 = new SpriteText
|
||||
{
|
||||
Text = comboJudgement.GetDescription(),
|
||||
Text = comboResult.GetDescription(),
|
||||
Font = @"Venera",
|
||||
TextSize = 14,
|
||||
}
|
||||
|
Reference in New Issue
Block a user