mirror of
https://github.com/ppy/osu
synced 2025-01-11 00:29:30 +00:00
Remove SliderPiece + HitObjectPiece
This commit is contained in:
parent
f64fe22f36
commit
4fc37d1137
@ -3,6 +3,7 @@
|
||||
|
||||
using osu.Framework.Allocation;
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Framework.Graphics.Containers;
|
||||
using osu.Game.Graphics;
|
||||
using osu.Game.Rulesets.Osu.Objects;
|
||||
using osu.Game.Rulesets.Osu.Objects.Drawables.Pieces;
|
||||
@ -10,12 +11,11 @@ using osuTK;
|
||||
|
||||
namespace osu.Game.Rulesets.Osu.Edit.Blueprints.HitCircles.Components
|
||||
{
|
||||
public class HitCirclePiece : HitObjectPiece
|
||||
public class HitCirclePiece : CompositeDrawable
|
||||
{
|
||||
private readonly HitCircle hitCircle;
|
||||
|
||||
public HitCirclePiece(HitCircle hitCircle)
|
||||
: base(hitCircle)
|
||||
{
|
||||
this.hitCircle = hitCircle;
|
||||
Origin = Anchor.Centre;
|
||||
|
@ -1,21 +0,0 @@
|
||||
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
||||
// See the LICENCE file in the repository root for full licence text.
|
||||
|
||||
using osu.Framework.Graphics.Containers;
|
||||
using osu.Game.Rulesets.Osu.Objects;
|
||||
|
||||
namespace osu.Game.Rulesets.Osu.Edit.Blueprints
|
||||
{
|
||||
/// <summary>
|
||||
/// A piece of a blueprint which responds to changes in the state of a <see cref="OsuHitObject"/>.
|
||||
/// </summary>
|
||||
public abstract class HitObjectPiece : CompositeDrawable
|
||||
{
|
||||
protected readonly OsuHitObject HitObject;
|
||||
|
||||
protected HitObjectPiece(OsuHitObject hitObject)
|
||||
{
|
||||
HitObject = hitObject;
|
||||
}
|
||||
}
|
||||
}
|
@ -1,21 +0,0 @@
|
||||
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
||||
// See the LICENCE file in the repository root for full licence text.
|
||||
|
||||
using osu.Game.Rulesets.Osu.Objects;
|
||||
|
||||
namespace osu.Game.Rulesets.Osu.Edit.Blueprints
|
||||
{
|
||||
/// <summary>
|
||||
/// A piece of a blueprint which responds to changes in the state of a <see cref="Objects.Slider"/>.
|
||||
/// </summary>
|
||||
public abstract class SliderPiece : HitObjectPiece
|
||||
{
|
||||
protected readonly Slider Slider;
|
||||
|
||||
protected SliderPiece(Slider slider)
|
||||
: base(slider)
|
||||
{
|
||||
Slider = slider;
|
||||
}
|
||||
}
|
||||
}
|
@ -7,14 +7,13 @@ using osu.Game.Rulesets.Osu.Objects;
|
||||
|
||||
namespace osu.Game.Rulesets.Osu.Edit.Blueprints.Sliders.Components
|
||||
{
|
||||
public class PathControlPointVisualiser : SliderPiece
|
||||
public class PathControlPointVisualiser : CompositeDrawable
|
||||
{
|
||||
private readonly Slider slider;
|
||||
|
||||
private readonly Container<PathControlPointPiece> pieces;
|
||||
|
||||
public PathControlPointVisualiser(Slider slider)
|
||||
: base(slider)
|
||||
{
|
||||
this.slider = slider;
|
||||
|
||||
|
@ -3,6 +3,7 @@
|
||||
|
||||
using System.Collections.Generic;
|
||||
using osu.Framework.Allocation;
|
||||
using osu.Framework.Graphics.Containers;
|
||||
using osu.Game.Graphics;
|
||||
using osu.Game.Rulesets.Osu.Objects;
|
||||
using osu.Game.Rulesets.Osu.Objects.Drawables.Pieces;
|
||||
@ -11,13 +12,12 @@ using osuTK.Graphics;
|
||||
|
||||
namespace osu.Game.Rulesets.Osu.Edit.Blueprints.Sliders.Components
|
||||
{
|
||||
public class SliderBodyPiece : SliderPiece
|
||||
public class SliderBodyPiece : CompositeDrawable
|
||||
{
|
||||
private readonly Slider slider;
|
||||
private readonly ManualSliderBody body;
|
||||
|
||||
public SliderBodyPiece(Slider slider)
|
||||
: base(slider)
|
||||
{
|
||||
this.slider = slider;
|
||||
|
||||
@ -40,7 +40,7 @@ namespace osu.Game.Rulesets.Osu.Edit.Blueprints.Sliders.Components
|
||||
base.Update();
|
||||
|
||||
Position = slider.StackedPosition;
|
||||
body.PathRadius = HitObject.Scale * OsuHitObject.OBJECT_RADIUS;
|
||||
body.PathRadius = slider.Scale * OsuHitObject.OBJECT_RADIUS;
|
||||
|
||||
var vertices = new List<Vector2>();
|
||||
slider.Path.GetPathToProgress(vertices, 0, 1);
|
||||
|
@ -12,14 +12,13 @@ using osuTK;
|
||||
|
||||
namespace osu.Game.Rulesets.Osu.Edit.Blueprints.Spinners.Components
|
||||
{
|
||||
public class SpinnerPiece : HitObjectPiece
|
||||
public class SpinnerPiece : CompositeDrawable
|
||||
{
|
||||
private readonly Spinner spinner;
|
||||
private readonly CircularContainer circle;
|
||||
private readonly RingPiece ring;
|
||||
|
||||
public SpinnerPiece(Spinner spinner)
|
||||
: base(spinner)
|
||||
{
|
||||
this.spinner = spinner;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user