Change taiko hit position to always match stable

This commit is contained in:
Salman Ahmed 2024-01-20 00:28:26 +03:00
parent d4fef99e1f
commit 2f618b7f35
2 changed files with 5 additions and 12 deletions

View File

@ -16,9 +16,6 @@ public void ApplyToDrawableRuleset(DrawableRuleset<TaikoHitObject> drawableRules
{
var drawableTaikoRuleset = (DrawableTaikoRuleset)drawableRuleset;
drawableTaikoRuleset.LockPlayfieldAspectRange.Value = false;
var playfield = (TaikoPlayfield)drawableRuleset.Playfield;
playfield.ClassicHitTargetPosition.Value = true;
}
public void ApplyToDrawableHitObject(DrawableHitObject drawable)

View File

@ -5,7 +5,6 @@
using System.Collections.Generic;
using System.Linq;
using osu.Framework.Allocation;
using osu.Framework.Bindables;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.Primitives;
@ -33,11 +32,6 @@ public partial class TaikoPlayfield : ScrollingPlayfield
public const float INPUT_DRUM_WIDTH = 180f;
/// <summary>
/// Whether the hit target should be nudged further towards the left area, matching the stable "classic" position.
/// </summary>
public Bindable<bool> ClassicHitTargetPosition = new BindableBool();
public Container UnderlayElements { get; private set; } = null!;
private Container<HitExplosion> hitExplosionContainer = null!;
@ -62,6 +56,7 @@ public partial class TaikoPlayfield : ScrollingPlayfield
private void load(OsuColour colours)
{
const float hit_target_width = BASE_HEIGHT;
const float hit_target_offset = -24f;
inputDrum = new InputDrum
{
@ -106,6 +101,7 @@ private void load(OsuColour colours)
Name = "Elements behind hit objects",
RelativeSizeAxes = Axes.Y,
Width = hit_target_width,
X = hit_target_offset,
Children = new[]
{
new SkinnableDrawable(new TaikoSkinComponentLookup(TaikoSkinComponents.KiaiGlow), _ => Empty())
@ -126,7 +122,7 @@ private void load(OsuColour colours)
{
Name = "Bar line content",
RelativeSizeAxes = Axes.Both,
Padding = new MarginPadding { Left = hit_target_width / 2 },
Padding = new MarginPadding { Left = hit_target_width / 2 + hit_target_offset },
Children = new Drawable[]
{
UnderlayElements = new Container
@ -140,7 +136,7 @@ private void load(OsuColour colours)
{
Name = "Masked hit objects content",
RelativeSizeAxes = Axes.Both,
Padding = new MarginPadding { Left = hit_target_width / 2 },
Padding = new MarginPadding { Left = hit_target_width / 2 + hit_target_offset },
Masking = true,
Child = HitObjectContainer,
},
@ -148,7 +144,7 @@ private void load(OsuColour colours)
{
Name = "Overlay content",
RelativeSizeAxes = Axes.Both,
Padding = new MarginPadding { Left = hit_target_width / 2 },
Padding = new MarginPadding { Left = hit_target_width / 2 + hit_target_offset },
Children = new Drawable[]
{
drumRollHitContainer = new DrumRollHitContainer(),