mirror of
https://github.com/osukey/osukey.git
synced 2025-08-04 23:24:04 +09:00
Determine size of ScrollingContainer a bit better to avoid taiko weirdness
This commit is contained in:
@ -28,14 +28,6 @@ namespace osu.Game.Rulesets.Taiko.Objects.Drawables
|
||||
FillMode = FillMode.Fit;
|
||||
}
|
||||
|
||||
protected override void LoadComplete()
|
||||
{
|
||||
base.LoadComplete();
|
||||
|
||||
// We need to set this here because RelativeSizeAxes won't/can't set our size by default with a different RelativeChildSize
|
||||
Width *= Parent.RelativeChildSize.X;
|
||||
}
|
||||
|
||||
protected override void CheckJudgement(bool userTriggered)
|
||||
{
|
||||
if (!userTriggered)
|
||||
@ -71,6 +63,13 @@ namespace osu.Game.Rulesets.Taiko.Objects.Drawables
|
||||
return UpdateJudgement(true);
|
||||
}
|
||||
|
||||
protected override void Update()
|
||||
{
|
||||
base.Update();
|
||||
|
||||
Size = BaseSize * Parent.RelativeChildSize;
|
||||
}
|
||||
|
||||
protected override void UpdateState(ArmedState state)
|
||||
{
|
||||
var circlePiece = MainPiece as CirclePiece;
|
||||
|
@ -199,6 +199,8 @@ namespace osu.Game.Rulesets.Taiko.Objects.Drawables
|
||||
{
|
||||
base.Update();
|
||||
|
||||
Size = BaseSize * Parent.RelativeChildSize;
|
||||
|
||||
// Make the swell stop at the hit target
|
||||
X = (float)Math.Max(Time.Current, HitObject.StartTime);
|
||||
|
||||
|
@ -16,6 +16,8 @@ namespace osu.Game.Rulesets.Taiko.Objects.Drawables
|
||||
{
|
||||
public override Vector2 OriginPosition => new Vector2(DrawHeight / 2);
|
||||
|
||||
protected readonly Vector2 BaseSize;
|
||||
|
||||
protected readonly TaikoPiece MainPiece;
|
||||
|
||||
public new TaikoHitType HitObject;
|
||||
@ -29,7 +31,7 @@ namespace osu.Game.Rulesets.Taiko.Objects.Drawables
|
||||
Origin = Anchor.Custom;
|
||||
|
||||
RelativeSizeAxes = Axes.Both;
|
||||
Size = new Vector2(HitObject.IsStrong ? TaikoHitObject.DEFAULT_STRONG_SIZE : TaikoHitObject.DEFAULT_SIZE);
|
||||
Size = BaseSize = new Vector2(HitObject.IsStrong ? TaikoHitObject.DEFAULT_STRONG_SIZE : TaikoHitObject.DEFAULT_SIZE);
|
||||
|
||||
Add(MainPiece = CreateMainPiece());
|
||||
MainPiece.KiaiMode = HitObject.Kiai;
|
||||
|
Reference in New Issue
Block a user