1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-14 05:32:54 +08:00

Fix post-merge issues

This commit is contained in:
smoogipoo 2018-11-14 14:29:22 +09:00
parent 29422345f7
commit 050af88be9
8 changed files with 39 additions and 33 deletions

View File

@ -3,8 +3,8 @@
using osu.Framework.Allocation;
using osu.Framework.Configuration;
using osu.Game.Rulesets.Objects;
using osu.Game.Rulesets.Osu.Objects;
using OpenTK;
namespace osu.Game.Rulesets.Osu.Edit.Blueprints
{
@ -13,7 +13,7 @@ namespace osu.Game.Rulesets.Osu.Edit.Blueprints
/// </summary>
public abstract class SliderPiece : HitObjectPiece
{
protected readonly IBindable<Vector2[]> ControlPointsBindable = new Bindable<Vector2[]>();
protected readonly IBindable<SliderPath> PathBindable = new Bindable<SliderPath>();
private readonly Slider slider;
@ -26,7 +26,7 @@ namespace osu.Game.Rulesets.Osu.Edit.Blueprints
[BackgroundDependencyLoader]
private void load()
{
ControlPointsBindable.BindTo(slider.ControlPointsBindable);
PathBindable.BindTo(slider.PathBindable);
}
}
}

View File

@ -25,7 +25,7 @@ namespace osu.Game.Rulesets.Osu.Edit.Blueprints.Sliders.Components
[BackgroundDependencyLoader]
private void load()
{
ControlPointsBindable.BindValueChanged(_ => updatePathControlPoints(), true);
PathBindable.BindValueChanged(_ => updatePathControlPoints(), true);
}
private void updatePathControlPoints()

View File

@ -3,15 +3,15 @@
using osu.Framework.Allocation;
using osu.Framework.Configuration;
using osu.Game.Rulesets.Objects;
using osu.Game.Rulesets.Osu.Edit.Blueprints.HitCircles.Components;
using osu.Game.Rulesets.Osu.Objects;
using OpenTK;
namespace osu.Game.Rulesets.Osu.Edit.Blueprints.Sliders.Components
{
public class SliderCirclePiece : HitCirclePiece
{
private readonly IBindable<Vector2[]> controlPointsBindable = new Bindable<Vector2[]>();
private readonly IBindable<SliderPath> pathBindable = new Bindable<SliderPath>();
private readonly Slider slider;
private readonly SliderPosition position;
@ -26,8 +26,8 @@ namespace osu.Game.Rulesets.Osu.Edit.Blueprints.Sliders.Components
[BackgroundDependencyLoader]
private void load()
{
controlPointsBindable.BindValueChanged(_ => UpdatePosition());
controlPointsBindable.BindTo(slider.ControlPointsBindable);
pathBindable.BindTo(slider.PathBindable);
pathBindable.BindValueChanged(_ => UpdatePosition(), true);
}
protected override void UpdatePosition()

View File

@ -11,6 +11,7 @@ using osu.Framework.Allocation;
using osu.Framework.Configuration;
using osu.Framework.Graphics.Containers;
using osu.Game.Configuration;
using osu.Game.Rulesets.Objects;
using osu.Game.Rulesets.Scoring;
using OpenTK.Graphics;
@ -29,7 +30,7 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables
private readonly IBindable<Vector2> positionBindable = new Bindable<Vector2>();
private readonly IBindable<float> scaleBindable = new Bindable<float>();
private readonly IBindable<Vector2[]> controlPointsBindable = new Bindable<Vector2[]>();
private readonly IBindable<SliderPath> pathBindable = new Bindable<SliderPath>();
public DrawableSlider(Slider s)
: base(s)
@ -103,11 +104,11 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables
Ball.Scale = new Vector2(HitObject.Scale);
});
controlPointsBindable.BindValueChanged(_ => Body.Refresh());
positionBindable.BindTo(HitObject.PositionBindable);
scaleBindable.BindTo(HitObject.ScaleBindable);
controlPointsBindable.BindTo(slider.ControlPointsBindable);
pathBindable.BindTo(slider.PathBindable);
pathBindable.BindValueChanged(_ => Body.Refresh());
}
public override Color4 AccentColour

View File

@ -4,6 +4,7 @@
using System;
using osu.Framework.Allocation;
using osu.Framework.Configuration;
using osu.Game.Rulesets.Objects;
using osu.Game.Rulesets.Objects.Types;
using OpenTK;
@ -12,7 +13,7 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables
public class DrawableSliderHead : DrawableHitCircle
{
private readonly IBindable<Vector2> positionBindable = new Bindable<Vector2>();
private readonly IBindable<Vector2[]> controlPointsBindable = new Bindable<Vector2[]>();
private readonly IBindable<SliderPath> pathBindable = new Bindable<SliderPath>();
private readonly Slider slider;
@ -25,11 +26,11 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables
[BackgroundDependencyLoader]
private void load()
{
positionBindable.BindValueChanged(_ => updatePosition());
controlPointsBindable.BindValueChanged(_ => updatePosition());
positionBindable.BindTo(HitObject.PositionBindable);
controlPointsBindable.BindTo(slider.ControlPointsBindable);
pathBindable.BindTo(slider.PathBindable);
positionBindable.BindValueChanged(_ => updatePosition());
pathBindable.BindValueChanged(_ => updatePosition(), true);
}
protected override void Update()

View File

@ -3,6 +3,7 @@
using osu.Framework.Configuration;
using osu.Framework.Graphics;
using osu.Game.Rulesets.Objects;
using osu.Game.Rulesets.Scoring;
using OpenTK;
@ -20,7 +21,7 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables
public bool Tracking { get; set; }
private readonly IBindable<Vector2> positionBindable = new Bindable<Vector2>();
private readonly IBindable<Vector2[]> controlPointsBindable = new Bindable<Vector2[]>();
private readonly IBindable<SliderPath> pathBindable = new Bindable<SliderPath>();
public DrawableSliderTail(Slider slider, SliderTailCircle hitCircle)
: base(hitCircle)
@ -34,11 +35,11 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables
AlwaysPresent = true;
positionBindable.BindValueChanged(_ => updatePosition());
controlPointsBindable.BindValueChanged(_ => updatePosition());
positionBindable.BindTo(hitCircle.PositionBindable);
controlPointsBindable.BindTo(slider.ControlPointsBindable);
pathBindable.BindTo(slider.PathBindable);
positionBindable.BindValueChanged(_ => updatePosition());
pathBindable.BindValueChanged(_ => updatePosition(), true);
}
protected override void CheckForResult(bool userTriggered, double timeOffset)

View File

@ -51,19 +51,12 @@ namespace osu.Game.Rulesets.Osu.Objects
}
}
private SliderPath path;
public readonly Bindable<SliderPath> PathBindable = new Bindable<SliderPath>();
public SliderPath Path
{
get => path;
set
{
path = value;
PathChanged?.Invoke(value);
if (TailCircle != null)
TailCircle.Position = EndPosition;
}
get => PathBindable.Value;
set => PathBindable.Value = value;
}
public double Distance => Path.Distance;
@ -162,7 +155,7 @@ namespace osu.Game.Rulesets.Osu.Objects
ComboIndex = ComboIndex,
};
TailCircle = new SliderTailCircle
TailCircle = new SliderTailCircle(this)
{
StartTime = EndTime,
Position = EndPosition,

View File

@ -1,13 +1,23 @@
// Copyright (c) 2007-2018 ppy Pty Ltd <contact@ppy.sh>.
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
using osu.Framework.Configuration;
using osu.Game.Rulesets.Judgements;
using osu.Game.Rulesets.Objects;
using osu.Game.Rulesets.Osu.Judgements;
namespace osu.Game.Rulesets.Osu.Objects
{
public class SliderTailCircle : SliderCircle
{
private readonly IBindable<SliderPath> pathBindable = new Bindable<SliderPath>();
public SliderTailCircle(Slider slider)
{
pathBindable.BindTo(slider.PathBindable);
pathBindable.BindValueChanged(_ => Position = slider.EndPosition);
}
public override Judgement CreateJudgement() => new OsuSliderTailJudgement();
}
}