2023-06-23 00:37:25 +08:00
|
|
|
|
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
2019-09-27 17:45:22 +08:00
|
|
|
|
// 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 selection or placement blueprint which visualises an <see cref="OsuHitObject"/>.
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <typeparam name="T">The type of <see cref="OsuHitObject"/> which this <see cref="BlueprintPiece{T}"/> visualises.</typeparam>
|
2022-11-24 13:32:20 +08:00
|
|
|
|
public abstract partial class BlueprintPiece<T> : CompositeDrawable
|
2019-09-27 17:45:22 +08:00
|
|
|
|
where T : OsuHitObject
|
|
|
|
|
{
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Updates this <see cref="BlueprintPiece{T}"/> using the properties of a <see cref="OsuHitObject"/>.
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="hitObject">The <see cref="OsuHitObject"/> to reference properties from.</param>
|
|
|
|
|
public virtual void UpdateFrom(T hitObject)
|
|
|
|
|
{
|
2019-10-21 14:03:49 +08:00
|
|
|
|
Position = hitObject.StackedPosition;
|
2019-09-27 17:45:22 +08:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|