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