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

@ -21,7 +21,9 @@ namespace osu.Game.Rulesets.Catch.Objects.Drawables
public Bindable<Color4> AccentColour { get; } = new Bindable<Color4>();
public Bindable<bool> HyperDash { get; } = new Bindable<bool>();
float IHasCatchObjectState.Scale => Scale.X;
public Vector2 DisplaySize => Size * Scale;
public float DisplayRotation => Rotation;
/// <summary>
/// Whether this hit object should stay on the catcher plate when the object is caught by the catcher.
@ -45,8 +47,8 @@ namespace osu.Game.Rulesets.Catch.Objects.Drawables
public virtual void CopyStateFrom(IHasCatchObjectState objectState)
{
HitObject = objectState.HitObject;
Scale = new Vector2(objectState.Scale);
Rotation = objectState.Rotation;
Scale = Vector2.Divide(objectState.DisplaySize, Size);
Rotation = objectState.DisplayRotation;
AccentColour.Value = objectState.AccentColour.Value;
HyperDash.Value = objectState.HyperDash.Value;
}