mirror of
https://github.com/ppy/osu.git
synced 2025-03-24 09:37:19 +08:00
Use playfield size constants where possible
This commit is contained in:
parent
0e6cc78d9a
commit
10220a61a5
@ -8,6 +8,7 @@ using osu.Framework.MathUtils;
|
||||
using osu.Game.Rulesets.Objects;
|
||||
using osu.Game.Rulesets.Objects.Types;
|
||||
using osu.Game.Rulesets.Osu.Objects;
|
||||
using osu.Game.Rulesets.Osu.UI;
|
||||
using osu.Game.Tests.Beatmaps;
|
||||
|
||||
namespace osu.Game.Rulesets.Osu.Tests
|
||||
@ -42,8 +43,8 @@ namespace osu.Game.Rulesets.Osu.Tests
|
||||
{
|
||||
StartTime = obj.StartTime,
|
||||
EndTime = (obj as IHasEndTime)?.EndTime ?? obj.StartTime,
|
||||
X = (obj as IHasPosition)?.X ?? 256,
|
||||
Y = (obj as IHasPosition)?.Y ?? 192,
|
||||
X = (obj as IHasPosition)?.X ?? OsuPlayfield.BASE_SIZE.X / 2,
|
||||
Y = (obj as IHasPosition)?.Y ?? OsuPlayfield.BASE_SIZE.Y / 2,
|
||||
};
|
||||
}
|
||||
|
||||
|
@ -6,6 +6,7 @@ using osu.Game.Beatmaps;
|
||||
using osu.Game.Rulesets.Osu.Objects;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using osu.Game.Rulesets.Osu.UI;
|
||||
using osu.Game.Rulesets.Replays;
|
||||
using osu.Game.Users;
|
||||
|
||||
@ -18,7 +19,7 @@ namespace osu.Game.Rulesets.Osu.Replays
|
||||
/// <summary>
|
||||
/// Constants (for spinners).
|
||||
/// </summary>
|
||||
protected static readonly Vector2 SPINNER_CENTRE = new Vector2(256, 192);
|
||||
protected static readonly Vector2 SPINNER_CENTRE = OsuPlayfield.BASE_SIZE / 2;
|
||||
protected const float SPIN_RADIUS = 50;
|
||||
|
||||
/// <summary>
|
||||
|
Loading…
x
Reference in New Issue
Block a user