mirror of
https://github.com/ppy/osu.git
synced 2024-12-14 12:33:01 +08:00
Merge pull request #6032 from peppy/fix-catch-rewind
Fix osu!catch rewind handling
This commit is contained in:
commit
e536d97255
@ -16,6 +16,8 @@ namespace osu.Game.Rulesets.Catch.Tests
|
||||
{
|
||||
}
|
||||
|
||||
protected override bool Autoplay => true;
|
||||
|
||||
[Test]
|
||||
public void TestHyperDash()
|
||||
{
|
||||
|
@ -50,6 +50,10 @@ namespace osu.Game.Rulesets.Catch.Objects.Drawable
|
||||
|
||||
public Func<CatchHitObject, bool> CheckPosition;
|
||||
|
||||
public bool IsOnPlate;
|
||||
|
||||
public override bool RemoveWhenNotAlive => IsOnPlate;
|
||||
|
||||
protected override void CheckForResult(bool userTriggered, double timeOffset)
|
||||
{
|
||||
if (CheckPosition == null) return;
|
||||
|
@ -69,10 +69,12 @@ namespace osu.Game.Rulesets.Catch.UI
|
||||
|
||||
caughtFruit.RelativePositionAxes = Axes.None;
|
||||
caughtFruit.Position = new Vector2(MovableCatcher.ToLocalSpace(fruit.ScreenSpaceDrawQuad.Centre).X - MovableCatcher.DrawSize.X / 2, 0);
|
||||
caughtFruit.IsOnPlate = true;
|
||||
|
||||
caughtFruit.Anchor = Anchor.TopCentre;
|
||||
caughtFruit.Origin = Anchor.Centre;
|
||||
caughtFruit.Scale *= 0.7f;
|
||||
caughtFruit.LifetimeStart = caughtFruit.HitObject.StartTime;
|
||||
caughtFruit.LifetimeEnd = double.MaxValue;
|
||||
|
||||
MovableCatcher.Add(caughtFruit);
|
||||
@ -205,7 +207,8 @@ namespace osu.Game.Rulesets.Catch.UI
|
||||
|
||||
AdditiveTarget.Add(additive);
|
||||
|
||||
additive.FadeTo(0.4f).FadeOut(800, Easing.OutQuint).Expire();
|
||||
additive.FadeTo(0.4f).FadeOut(800, Easing.OutQuint);
|
||||
additive.Expire(true);
|
||||
|
||||
Scheduler.AddDelayed(beginTrail, HyperDashing ? 25 : 50);
|
||||
}
|
||||
@ -300,6 +303,7 @@ namespace osu.Game.Rulesets.Catch.UI
|
||||
{
|
||||
this.FadeColour(Color4.White, hyper_dash_transition_length, Easing.OutQuint);
|
||||
this.FadeTo(1, hyper_dash_transition_length, Easing.OutQuint);
|
||||
Trail &= Dashing;
|
||||
}
|
||||
}
|
||||
else
|
||||
@ -406,6 +410,9 @@ namespace osu.Game.Rulesets.Catch.UI
|
||||
|
||||
f.MoveToY(f.Y + 75, 750, Easing.InSine);
|
||||
f.FadeOut(750);
|
||||
|
||||
// todo: this shouldn't exist once DrawableHitObject's ClearTransformsAfter overrides are repaired.
|
||||
f.LifetimeStart = Time.Current;
|
||||
f.Expire();
|
||||
}
|
||||
}
|
||||
@ -436,10 +443,13 @@ namespace osu.Game.Rulesets.Catch.UI
|
||||
ExplodingFruitTarget.Add(fruit);
|
||||
}
|
||||
|
||||
fruit.ClearTransforms();
|
||||
fruit.MoveToY(fruit.Y - 50, 250, Easing.OutSine).Then().MoveToY(fruit.Y + 50, 500, Easing.InSine);
|
||||
fruit.MoveToX(fruit.X + originalX * 6, 1000);
|
||||
fruit.FadeOut(750);
|
||||
|
||||
// todo: this shouldn't exist once DrawableHitObject's ClearTransformsAfter overrides are repaired.
|
||||
fruit.LifetimeStart = Time.Current;
|
||||
fruit.Expire();
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user