mirror of
https://github.com/ppy/osu.git
synced 2025-02-20 05:47:50 +08:00
Make all juice nested objects from ticks
This commit is contained in:
parent
1f1bdc6162
commit
1b732c799a
@ -26,30 +26,15 @@ namespace osu.Game.Rulesets.Catch.Objects.Drawable
|
||||
RelativeChildSize = new Vector2(1, (float)HitObject.Duration)
|
||||
};
|
||||
|
||||
var start = new DrawableFruit(new Fruit
|
||||
foreach (CatchBaseHit tick in s.Ticks)
|
||||
{
|
||||
Samples = s.Samples,
|
||||
ComboColour = Color4.Blue,
|
||||
StartTime = s.StartTime,
|
||||
X = s.X,
|
||||
});
|
||||
Droplet droplet = tick as Droplet;
|
||||
if (droplet != null)
|
||||
AddNested(new DrawableDroplet(droplet));
|
||||
|
||||
AddNested(start);
|
||||
|
||||
var end = new DrawableFruit(new Fruit
|
||||
{
|
||||
Samples = s.Samples,
|
||||
ComboColour = Color4.Red,
|
||||
StartTime = s.EndTime,
|
||||
X = s.EndX,
|
||||
});
|
||||
|
||||
AddNested(end);
|
||||
|
||||
foreach (var tick in s.Ticks)
|
||||
{
|
||||
var droplet = new DrawableDroplet(tick);
|
||||
AddNested(droplet);
|
||||
Fruit fruit = tick as Fruit;
|
||||
if (fruit != null)
|
||||
AddNested(new DrawableFruit(fruit));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -41,7 +41,7 @@ namespace osu.Game.Rulesets.Catch.Objects
|
||||
TickDistance = scoringDistance / difficulty.SliderTickRate;
|
||||
}
|
||||
|
||||
public IEnumerable<Droplet> Ticks
|
||||
public IEnumerable<CatchBaseHit> Ticks
|
||||
{
|
||||
get
|
||||
{
|
||||
@ -53,8 +53,13 @@ namespace osu.Game.Rulesets.Catch.Objects
|
||||
|
||||
var minDistanceFromEnd = Velocity * 0.01;
|
||||
|
||||
// temporary
|
||||
while (tickDistance > 100) tickDistance /= 2;
|
||||
yield return new Fruit
|
||||
{
|
||||
Samples = Samples,
|
||||
ComboColour = ComboColour,
|
||||
StartTime = StartTime,
|
||||
X = X
|
||||
};
|
||||
|
||||
for (var repeat = 0; repeat < RepeatCount; repeat++)
|
||||
{
|
||||
@ -66,8 +71,10 @@ namespace osu.Game.Rulesets.Catch.Objects
|
||||
if (d > length - minDistanceFromEnd)
|
||||
break;
|
||||
|
||||
var distanceProgress = d / length;
|
||||
var timeProgress = reversed ? 1 - distanceProgress : distanceProgress;
|
||||
var timeProgress = d / length;
|
||||
var distanceProgress = reversed ? 1 - timeProgress : timeProgress;
|
||||
|
||||
float tinyDroplet = 0;
|
||||
|
||||
yield return new Droplet
|
||||
{
|
||||
@ -81,6 +88,14 @@ namespace osu.Game.Rulesets.Catch.Objects
|
||||
}))
|
||||
};
|
||||
}
|
||||
|
||||
yield return new Fruit
|
||||
{
|
||||
Samples = Samples,
|
||||
ComboColour = ComboColour,
|
||||
StartTime = repeatStartTime + repeatDuration,
|
||||
X = Curve.PositionAt(reversed ? 1 : 0).X
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user