1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-17 05:13:21 +08:00

Base playfield height + hit target offset on hit object height.

This commit is contained in:
smoogipooo 2017-03-28 17:13:05 +09:00
parent ae4cabccef
commit adf2550811
4 changed files with 11 additions and 23 deletions

View File

@ -12,7 +12,7 @@ namespace osu.Game.Modes.Taiko.Objects
/// <summary> /// <summary>
/// HitCircle radius. /// HitCircle radius.
/// </summary> /// </summary>
public const float CIRCLE_RADIUS = 64; public const float CIRCLE_RADIUS = 51;
/// <summary> /// <summary>
/// The time to scroll in the HitObject. /// The time to scroll in the HitObject.

View File

@ -18,7 +18,7 @@ namespace osu.Game.Modes.Taiko.UI
/// <summary> /// <summary>
/// Diameter of normal hit object circles. /// Diameter of normal hit object circles.
/// </summary> /// </summary>
private const float normal_diameter = TaikoHitObject.CIRCLE_RADIUS * 2 * TaikoPlayfield.PLAYFIELD_SCALE; private const float normal_diameter = TaikoHitObject.CIRCLE_RADIUS * 2;
/// <summary> /// <summary>
/// Diameter of finisher hit object circles. /// Diameter of finisher hit object circles.
@ -47,7 +47,7 @@ namespace osu.Game.Modes.Taiko.UI
Anchor = Anchor.TopCentre, Anchor = Anchor.TopCentre,
Origin = Anchor.TopCentre, Origin = Anchor.TopCentre,
Y = border_offset, Y = border_offset,
Size = new Vector2(border_thickness, (TaikoPlayfield.PlayfieldHeight - finisher_diameter) / 2f - border_offset), Size = new Vector2(border_thickness, (TaikoPlayfield.PLAYFIELD_HEIGHT - finisher_diameter) / 2f - border_offset),
Alpha = 0.1f Alpha = 0.1f
}, },
new CircularContainer new CircularContainer
@ -96,7 +96,7 @@ namespace osu.Game.Modes.Taiko.UI
Anchor = Anchor.BottomCentre, Anchor = Anchor.BottomCentre,
Origin = Anchor.BottomCentre, Origin = Anchor.BottomCentre,
Y = -border_offset, Y = -border_offset,
Size = new Vector2(border_thickness, (TaikoPlayfield.PlayfieldHeight - finisher_diameter) / 2f - border_offset), Size = new Vector2(border_thickness, (TaikoPlayfield.PLAYFIELD_HEIGHT - finisher_diameter) / 2f - border_offset),
Alpha = 0.1f Alpha = 0.1f
}, },
}; };

View File

@ -22,7 +22,7 @@ namespace osu.Game.Modes.Taiko.UI
{ {
public InputDrum() public InputDrum()
{ {
Size = new Vector2(TaikoPlayfield.PlayfieldHeight); Size = new Vector2(TaikoPlayfield.PLAYFIELD_HEIGHT);
const float middle_split = 10; const float middle_split = 10;

View File

@ -20,25 +20,15 @@ namespace osu.Game.Modes.Taiko.UI
public class TaikoPlayfield : Playfield<TaikoHitObject, TaikoJudgement> public class TaikoPlayfield : Playfield<TaikoHitObject, TaikoJudgement>
{ {
/// <summary> /// <summary>
/// The default play field height. /// The play field height. This is relative to the size of hit objects
/// such that the playfield is just a bit larger than finishers.
/// </summary> /// </summary>
public const float PLAYFIELD_BASE_HEIGHT = 242; public const float PLAYFIELD_HEIGHT = TaikoHitObject.CIRCLE_RADIUS * 2 * 2;
/// <summary>
/// The play field height scale.
/// This also uniformly scales the notes to match the new playfield height.
/// </summary>
public const float PLAYFIELD_SCALE = 0.65f;
/// <summary>
/// The play field height after scaling.
/// </summary>
public static float PlayfieldHeight => PLAYFIELD_BASE_HEIGHT * PLAYFIELD_SCALE;
/// <summary> /// <summary>
/// The offset from <see cref="left_area_size"/> which the center of the hit target lies at. /// The offset from <see cref="left_area_size"/> which the center of the hit target lies at.
/// </summary> /// </summary>
private const float hit_target_offset = 80; private const float hit_target_offset = TaikoHitObject.CIRCLE_RADIUS * 1.5f + 40;
/// <summary> /// <summary>
/// The size of the left area of the playfield. This area contains the input drum. /// The size of the left area of the playfield. This area contains the input drum.
@ -61,7 +51,7 @@ namespace osu.Game.Modes.Taiko.UI
public TaikoPlayfield() public TaikoPlayfield()
{ {
RelativeSizeAxes = Axes.X; RelativeSizeAxes = Axes.X;
Height = PlayfieldHeight; Height = PLAYFIELD_HEIGHT;
AddInternal(new Drawable[] AddInternal(new Drawable[]
{ {
@ -102,7 +92,6 @@ namespace osu.Game.Modes.Taiko.UI
Anchor = Anchor.CentreLeft, Anchor = Anchor.CentreLeft,
Origin = Anchor.Centre, Origin = Anchor.Centre,
Size = new Vector2(TaikoHitObject.CIRCLE_RADIUS * 2), Size = new Vector2(TaikoHitObject.CIRCLE_RADIUS * 2),
Scale = new Vector2(PLAYFIELD_SCALE),
BlendingMode = BlendingMode.Additive BlendingMode = BlendingMode.Additive
}, },
//barLineContainer = new Container<DrawableBarLine> //barLineContainer = new Container<DrawableBarLine>
@ -129,7 +118,7 @@ namespace osu.Game.Modes.Taiko.UI
}, },
leftBackgroundContainer = new Container leftBackgroundContainer = new Container
{ {
Size = new Vector2(left_area_size, PlayfieldHeight), Size = new Vector2(left_area_size, PLAYFIELD_HEIGHT),
BorderThickness = 1, BorderThickness = 1,
Children = new Drawable[] Children = new Drawable[]
{ {
@ -174,7 +163,6 @@ namespace osu.Game.Modes.Taiko.UI
public override void Add(DrawableHitObject<TaikoHitObject, TaikoJudgement> h) public override void Add(DrawableHitObject<TaikoHitObject, TaikoJudgement> h)
{ {
h.Depth = (float)h.HitObject.StartTime; h.Depth = (float)h.HitObject.StartTime;
h.Scale = new Vector2(PLAYFIELD_SCALE);
base.Add(h); base.Add(h);
} }