mirror of
https://github.com/osukey/osukey.git
synced 2025-05-30 09:57:21 +09: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)
|
RelativeChildSize = new Vector2(1, (float)HitObject.Duration)
|
||||||
};
|
};
|
||||||
|
|
||||||
var start = new DrawableFruit(new Fruit
|
foreach (CatchBaseHit tick in s.Ticks)
|
||||||
{
|
{
|
||||||
Samples = s.Samples,
|
Droplet droplet = tick as Droplet;
|
||||||
ComboColour = Color4.Blue,
|
if (droplet != null)
|
||||||
StartTime = s.StartTime,
|
AddNested(new DrawableDroplet(droplet));
|
||||||
X = s.X,
|
|
||||||
});
|
|
||||||
|
|
||||||
AddNested(start);
|
Fruit fruit = tick as Fruit;
|
||||||
|
if (fruit != null)
|
||||||
var end = new DrawableFruit(new Fruit
|
AddNested(new DrawableFruit(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);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -41,7 +41,7 @@ namespace osu.Game.Rulesets.Catch.Objects
|
|||||||
TickDistance = scoringDistance / difficulty.SliderTickRate;
|
TickDistance = scoringDistance / difficulty.SliderTickRate;
|
||||||
}
|
}
|
||||||
|
|
||||||
public IEnumerable<Droplet> Ticks
|
public IEnumerable<CatchBaseHit> Ticks
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
@ -53,8 +53,13 @@ namespace osu.Game.Rulesets.Catch.Objects
|
|||||||
|
|
||||||
var minDistanceFromEnd = Velocity * 0.01;
|
var minDistanceFromEnd = Velocity * 0.01;
|
||||||
|
|
||||||
// temporary
|
yield return new Fruit
|
||||||
while (tickDistance > 100) tickDistance /= 2;
|
{
|
||||||
|
Samples = Samples,
|
||||||
|
ComboColour = ComboColour,
|
||||||
|
StartTime = StartTime,
|
||||||
|
X = X
|
||||||
|
};
|
||||||
|
|
||||||
for (var repeat = 0; repeat < RepeatCount; repeat++)
|
for (var repeat = 0; repeat < RepeatCount; repeat++)
|
||||||
{
|
{
|
||||||
@ -66,8 +71,10 @@ namespace osu.Game.Rulesets.Catch.Objects
|
|||||||
if (d > length - minDistanceFromEnd)
|
if (d > length - minDistanceFromEnd)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
var distanceProgress = d / length;
|
var timeProgress = d / length;
|
||||||
var timeProgress = reversed ? 1 - distanceProgress : distanceProgress;
|
var distanceProgress = reversed ? 1 - timeProgress : timeProgress;
|
||||||
|
|
||||||
|
float tinyDroplet = 0;
|
||||||
|
|
||||||
yield return new Droplet
|
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…
x
Reference in New Issue
Block a user