mirror of
https://github.com/ppy/osu.git
synced 2025-01-15 01:43:15 +08:00
Make juice streams interactive (and correctly positioned)
This commit is contained in:
parent
e4f915e5af
commit
1f1bdc6162
@ -45,6 +45,7 @@ namespace osu.Game.Rulesets.Catch.Beatmaps
|
||||
yield return new Fruit
|
||||
{
|
||||
StartTime = obj.StartTime,
|
||||
Samples = obj.Samples,
|
||||
NewCombo = comboData?.NewCombo ?? false,
|
||||
X = positionData.X / CatchPlayfield.BASE_WIDTH
|
||||
};
|
||||
|
@ -25,7 +25,6 @@ namespace osu.Game.Rulesets.Catch.Objects.Drawable
|
||||
protected DrawableCatchHitObject(CatchBaseHit hitObject)
|
||||
: base(hitObject)
|
||||
{
|
||||
Origin = Anchor.Centre;
|
||||
RelativePositionAxes = Axes.Both;
|
||||
X = hitObject.X;
|
||||
Y = (float)HitObject.StartTime;
|
||||
|
@ -2,6 +2,7 @@
|
||||
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
||||
|
||||
using osu.Framework.Allocation;
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Game.Rulesets.Catch.Objects.Drawable.Pieces;
|
||||
using OpenTK;
|
||||
using OpenTK.Graphics;
|
||||
@ -13,6 +14,8 @@ namespace osu.Game.Rulesets.Catch.Objects.Drawable
|
||||
public DrawableDroplet(Droplet h)
|
||||
: base(h)
|
||||
{
|
||||
Origin = Anchor.Centre;
|
||||
|
||||
Size = new Vector2(Pulp.PULP_SIZE);
|
||||
|
||||
AccentColour = Color4.Green;
|
||||
|
@ -17,6 +17,8 @@ namespace osu.Game.Rulesets.Catch.Objects.Drawable
|
||||
public DrawableFruit(Fruit h)
|
||||
: base(h)
|
||||
{
|
||||
Origin = Anchor.Centre;
|
||||
|
||||
Size = new Vector2(pulp_size * 2.2f, pulp_size * 2.8f);
|
||||
AccentColour = HitObject.ComboColour;
|
||||
Masking = false;
|
||||
|
@ -17,6 +17,7 @@ namespace osu.Game.Rulesets.Catch.Objects.Drawable
|
||||
{
|
||||
RelativeSizeAxes = Axes.Both;
|
||||
Height = (float)HitObject.Duration;
|
||||
X = 0;
|
||||
|
||||
Child = dropletContainer = new Container
|
||||
{
|
||||
@ -27,6 +28,7 @@ namespace osu.Game.Rulesets.Catch.Objects.Drawable
|
||||
|
||||
var start = new DrawableFruit(new Fruit
|
||||
{
|
||||
Samples = s.Samples,
|
||||
ComboColour = Color4.Blue,
|
||||
StartTime = s.StartTime,
|
||||
X = s.X,
|
||||
@ -36,6 +38,7 @@ namespace osu.Game.Rulesets.Catch.Objects.Drawable
|
||||
|
||||
var end = new DrawableFruit(new Fruit
|
||||
{
|
||||
Samples = s.Samples,
|
||||
ComboColour = Color4.Red,
|
||||
StartTime = s.EndTime,
|
||||
X = s.EndX,
|
||||
@ -52,6 +55,7 @@ namespace osu.Game.Rulesets.Catch.Objects.Drawable
|
||||
|
||||
protected override void AddNested(DrawableHitObject<CatchBaseHit> h)
|
||||
{
|
||||
((DrawableCatchHitObject)h).CheckPosition = o => CheckPosition?.Invoke(o) ?? false;
|
||||
dropletContainer.Add(h);
|
||||
base.AddNested(h);
|
||||
}
|
||||
|
@ -54,7 +54,7 @@ namespace osu.Game.Rulesets.Catch.Objects
|
||||
var minDistanceFromEnd = Velocity * 0.01;
|
||||
|
||||
// temporary
|
||||
while (tickDistance > 10) tickDistance /= 2;
|
||||
while (tickDistance > 100) tickDistance /= 2;
|
||||
|
||||
for (var repeat = 0; repeat < RepeatCount; repeat++)
|
||||
{
|
||||
|
@ -83,7 +83,11 @@ namespace osu.Game.Rulesets.Catch.UI
|
||||
if (judgement.IsHit)
|
||||
{
|
||||
Vector2 screenPosition = judgedObject.ScreenSpaceDrawQuad.Centre;
|
||||
Remove(judgedObject);
|
||||
|
||||
// todo: don't do this
|
||||
(judgedObject.Parent as Container<DrawableHitObject>)?.Remove(judgedObject);
|
||||
(judgedObject.Parent as Container)?.Remove(judgedObject);
|
||||
|
||||
catcher.Add(judgedObject, screenPosition);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user