mirror of
https://github.com/ppy/osu.git
synced 2024-11-13 18:07:25 +08:00
Fix already caught osu!catch objects not correctly disappearing
This commit is contained in:
parent
fdd3687437
commit
ec7a50b75f
@ -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,6 +69,7 @@ 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;
|
||||||
@ -384,6 +385,12 @@ namespace osu.Game.Rulesets.Catch.UI
|
|||||||
X = hyperDashTargetPosition;
|
X = hyperDashTargetPosition;
|
||||||
SetHyperDashState();
|
SetHyperDashState();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (Clock.ElapsedFrameTime < 0)
|
||||||
|
{
|
||||||
|
AdditiveTarget.RemoveAll(d => Clock.CurrentTime < d.LifetimeStart);
|
||||||
|
caughtFruit.RemoveAll(d => d.HitObject.StartTime > Clock.CurrentTime);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@ -407,7 +414,7 @@ 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);
|
||||||
f.Expire();
|
f.Expire(true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -437,11 +444,11 @@ 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);
|
||||||
|
fruit.Expire(true);
|
||||||
fruit.Expire();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user