Combine DisplayRadius and Scale to DisplaySize

This commit is contained in:
ekrctb
2020-12-10 20:43:01 +09:00
parent e097b6e61c
commit 2634c6b8d9
5 changed files with 24 additions and 22 deletions

View File

@ -29,16 +29,14 @@ namespace osu.Game.Rulesets.Catch.Objects.Drawables
/// </summary>
protected virtual float ScaleFactor => 1;
public float DisplayRadius => CatchHitObject.OBJECT_RADIUS * HitObject.Scale * ScaleFactor;
/// <summary>
/// The container internal transforms (such as scaling based on the circle size) are applied to.
/// </summary>
protected readonly Container ScalingContainer;
float IHasCatchObjectState.Scale => HitObject.Scale * ScaleFactor;
public Vector2 DisplaySize => ScalingContainer.Size * ScalingContainer.Scale;
float IHasCatchObjectState.Rotation => ScalingContainer.Rotation;
public float DisplayRotation => ScalingContainer.Rotation;
protected DrawablePalpableCatchHitObject([CanBeNull] CatchHitObject h)
: base(h)
@ -65,7 +63,7 @@ namespace osu.Game.Rulesets.Catch.Objects.Drawables
ScaleBindable.BindValueChanged(scale =>
{
ScalingContainer.Scale = new Vector2(scale.NewValue * ScaleFactor);
Size = ScalingContainer.Size * ScalingContainer.Scale;
Size = DisplaySize;
}, true);
IndexInBeatmap.BindValueChanged(_ => UpdateComboColour());