1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-11 13:37:25 +08:00

Adjust explanatory comments

This commit is contained in:
smoogipoo 2021-03-11 20:57:00 +09:00
parent 3f34981664
commit 8bc494b224

View File

@ -18,13 +18,13 @@ namespace osu.Game.Rulesets.Osu.Skinning.Legacy
public abstract class LegacySpinner : CompositeDrawable public abstract class LegacySpinner : CompositeDrawable
{ {
/// <remarks> /// <remarks>
/// osu!stable applies this adjustment conditionally, locally in the spinner. /// All constant spinner coordinates are in osu!stable's gamefield space, which is shifted 16px downwards.
/// in lazer this is handled at a higher level in <see cref="OsuPlayfieldAdjustmentContainer"/>, /// This offset is negated in both osu!stable and osu!lazer to bring all constant coordinates into window-space.
/// therefore it's safe to apply it unconditionally in this component. /// Note: SPINNER_Y_CENTRE + SPINNER_TOP_OFFSET - Position.Y = 240 (=480/2, or half the window-space in osu!stable)
/// </remarks> /// </remarks>
protected static readonly float SPINNER_TOP_OFFSET = 45f - 16f; protected const float SPINNER_TOP_OFFSET = 45f - 16f;
protected static readonly float SPINNER_Y_CENTRE = SPINNER_TOP_OFFSET + 219f; protected const float SPINNER_Y_CENTRE = SPINNER_TOP_OFFSET + 219f;
protected const float SPRITE_SCALE = 0.625f; protected const float SPRITE_SCALE = 0.625f;
@ -43,9 +43,8 @@ namespace osu.Game.Rulesets.Osu.Skinning.Legacy
Origin = Anchor.Centre; Origin = Anchor.Centre;
Size = new Vector2(640, 480); Size = new Vector2(640, 480);
// stable applies this adjustment conditionally, locally in the spinner. // osu!stable positions components of the spinner in window-space (as opposed to gamefield-space).
// in lazer this is handled at a higher level in OsuPlayfieldAdjustmentContainer, // in lazer, the gamefield-space transformation is applied in OsuPlayfieldAdjustmentContainer, which is inverted here to bring coordinates back into window-space.
// therefore it's safe to apply it unconditionally in this component.
Position = new Vector2(0, -8f); Position = new Vector2(0, -8f);
DrawableSpinner = (DrawableSpinner)drawableHitObject; DrawableSpinner = (DrawableSpinner)drawableHitObject;