mirror of
https://github.com/ppy/osu
synced 2025-01-03 04:42:10 +00:00
Use more specific type for caught object
This commit is contained in:
parent
a231a4aa6d
commit
8d32cca5d6
@ -49,7 +49,7 @@ namespace osu.Game.Rulesets.Catch.UI
|
||||
|
||||
public Container ExplodingFruitTarget;
|
||||
|
||||
private readonly Container<DrawableHitObject> caughtFruitContainer;
|
||||
private readonly Container<DrawablePalpableCatchHitObject> caughtFruitContainer;
|
||||
|
||||
[NotNull]
|
||||
private readonly Container trailsTarget;
|
||||
@ -122,7 +122,7 @@ namespace osu.Game.Rulesets.Catch.UI
|
||||
InternalChildren = new Drawable[]
|
||||
{
|
||||
hitExplosionPool = new DrawablePool<HitExplosion>(10),
|
||||
caughtFruitContainer = new Container<DrawableHitObject>
|
||||
caughtFruitContainer = new Container<DrawablePalpableCatchHitObject>
|
||||
{
|
||||
Anchor = Anchor.TopCentre,
|
||||
Origin = Anchor.BottomCentre,
|
||||
@ -196,7 +196,7 @@ namespace osu.Game.Rulesets.Catch.UI
|
||||
/// Add a caught fruit to the catcher's stack.
|
||||
/// </summary>
|
||||
/// <param name="fruit">The fruit that was caught.</param>
|
||||
public void PlaceOnPlate(DrawableCatchHitObject fruit)
|
||||
public void PlaceOnPlate(DrawablePalpableCatchHitObject fruit)
|
||||
{
|
||||
var ourRadius = fruit.DisplayRadius;
|
||||
float theirRadius = 0;
|
||||
@ -385,7 +385,7 @@ namespace osu.Game.Rulesets.Catch.UI
|
||||
Explode(f);
|
||||
}
|
||||
|
||||
public void Drop(DrawableHitObject fruit)
|
||||
public void Drop(DrawablePalpableCatchHitObject fruit)
|
||||
{
|
||||
removeFromPlateWithTransform(fruit, f =>
|
||||
{
|
||||
@ -394,7 +394,7 @@ namespace osu.Game.Rulesets.Catch.UI
|
||||
});
|
||||
}
|
||||
|
||||
public void Explode(DrawableHitObject fruit)
|
||||
public void Explode(DrawablePalpableCatchHitObject fruit)
|
||||
{
|
||||
var originalX = fruit.X * Scale.X;
|
||||
|
||||
@ -478,7 +478,7 @@ namespace osu.Game.Rulesets.Catch.UI
|
||||
updateCatcher();
|
||||
}
|
||||
|
||||
private void removeFromPlateWithTransform(DrawableHitObject fruit, Action<DrawableHitObject> action)
|
||||
private void removeFromPlateWithTransform(DrawablePalpableCatchHitObject fruit, Action<DrawablePalpableCatchHitObject> action)
|
||||
{
|
||||
if (ExplodingFruitTarget != null)
|
||||
{
|
||||
|
@ -104,7 +104,7 @@ namespace osu.Game.Rulesets.Catch.UI
|
||||
comboDisplay.X = MovableCatcher.X;
|
||||
}
|
||||
|
||||
private DrawableCatchHitObject createCaughtFruit(DrawablePalpableCatchHitObject hitObject)
|
||||
private DrawablePalpableCatchHitObject createCaughtFruit(DrawablePalpableCatchHitObject hitObject)
|
||||
{
|
||||
switch (hitObject.HitObject)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user