// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. using osu.Framework.Allocation; using osu.Framework.Bindables; using osu.Framework.Graphics.Containers; using osu.Game.Rulesets.Osu.Objects; using osuTK; namespace osu.Game.Rulesets.Osu.Edit.Blueprints { /// /// A piece of a blueprint which responds to changes in the state of a . /// public abstract class HitObjectPiece : CompositeDrawable { protected readonly IBindable PositionBindable = new Bindable(); protected readonly IBindable StackHeightBindable = new Bindable(); protected readonly IBindable ScaleBindable = new Bindable(); private readonly OsuHitObject hitObject; protected HitObjectPiece(OsuHitObject hitObject) { this.hitObject = hitObject; } [BackgroundDependencyLoader] private void load() { PositionBindable.BindTo(hitObject.PositionBindable); StackHeightBindable.BindTo(hitObject.StackHeightBindable); ScaleBindable.BindTo(hitObject.ScaleBindable); } } }