mirror of
https://github.com/ppy/osu.git
synced 2024-12-14 21:43:04 +08:00
fix
This commit is contained in:
parent
cc96d275c2
commit
847b63066b
@ -418,10 +418,13 @@ namespace osu.Game.Rulesets.Catch.UI
|
||||
|
||||
private void clearPlate(DroppedObjectAnimation animation)
|
||||
{
|
||||
var droppedObjects = caughtObjectContainer.Children.Select(getDroppedObject).ToArray();
|
||||
var caughtObjects = caughtObjectContainer.Children.ToArray();
|
||||
|
||||
caughtObjectContainer.Clear(false);
|
||||
|
||||
//use the already returned PoolableDrawables for new objects
|
||||
var droppedObjects = caughtObjects.Select(getDroppedObject).ToArray();
|
||||
|
||||
droppedObjectTarget.AddRange(droppedObjects);
|
||||
|
||||
foreach (var droppedObject in droppedObjects)
|
||||
@ -430,13 +433,11 @@ namespace osu.Game.Rulesets.Catch.UI
|
||||
|
||||
private void removeFromPlate(CaughtObject caughtObject, DroppedObjectAnimation animation)
|
||||
{
|
||||
var droppedObject = getDroppedObject(caughtObject);
|
||||
|
||||
caughtObjectContainer.Remove(caughtObject, false);
|
||||
|
||||
droppedObjectTarget.Add(droppedObject);
|
||||
droppedObjectTarget.Add(getDroppedObject(caughtObject));
|
||||
|
||||
applyDropAnimation(droppedObject, animation);
|
||||
applyDropAnimation(caughtObject, animation);
|
||||
}
|
||||
|
||||
private void applyDropAnimation(Drawable d, DroppedObjectAnimation animation)
|
||||
@ -456,6 +457,8 @@ namespace osu.Game.Rulesets.Catch.UI
|
||||
break;
|
||||
}
|
||||
|
||||
//define lifetime start for dropped objects to be disposed correctly when rewinding replay
|
||||
d.LifetimeStart = Clock.CurrentTime;
|
||||
d.Expire();
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user