mirror of
https://github.com/osukey/osukey.git
synced 2025-06-03 20:07:18 +09:00
Merge pull request #10259 from bdach/fix-taiko-test-visual-brokenness
Fix visual brokenness in taiko tests using DrawableTestHit
This commit is contained in:
commit
abc4f90c7d
@ -22,6 +22,12 @@ namespace osu.Game.Rulesets.Taiko.Tests
|
||||
HitObject.ApplyDefaults(new ControlPointInfo(), new BeatmapDifficulty());
|
||||
}
|
||||
|
||||
protected override void UpdateInitialTransforms()
|
||||
{
|
||||
// base implementation in DrawableHitObject forces alpha to 1.
|
||||
// suppress locally to allow hiding the visuals wherever necessary.
|
||||
}
|
||||
|
||||
[BackgroundDependencyLoader]
|
||||
private void load()
|
||||
{
|
||||
|
@ -212,7 +212,7 @@ namespace osu.Game.Rulesets.Taiko.Tests.Skinning
|
||||
foreach (var playfield in playfields)
|
||||
{
|
||||
var hit = new DrawableTestHit(new Hit(), judgementResult.Type);
|
||||
Add(hit);
|
||||
playfield.Add(hit);
|
||||
|
||||
playfield.OnNewResult(hit, judgementResult);
|
||||
}
|
||||
|
@ -35,7 +35,9 @@ namespace osu.Game.Rulesets.Taiko.Tests.Skinning
|
||||
RelativeSizeAxes = Axes.Both,
|
||||
Children = new Drawable[]
|
||||
{
|
||||
hit,
|
||||
// the hit needs to be added to hierarchy in order for nested objects to be created correctly.
|
||||
// setting zero alpha is supposed to prevent the test from looking broken.
|
||||
hit.With(h => h.Alpha = 0),
|
||||
new HitExplosion(hit, hit.Type)
|
||||
{
|
||||
Anchor = Anchor.Centre,
|
||||
|
@ -149,7 +149,7 @@ namespace osu.Game.Rulesets.Taiko.Tests
|
||||
|
||||
var h = new DrawableTestHit(hit) { X = RNG.NextSingle(hitResult == HitResult.Good ? -0.1f : -0.05f, hitResult == HitResult.Good ? 0.1f : 0.05f) };
|
||||
|
||||
Add(h);
|
||||
drawableRuleset.Playfield.Add(h);
|
||||
|
||||
((TaikoPlayfield)drawableRuleset.Playfield).OnNewResult(h, new JudgementResult(new HitObject(), new TaikoJudgement()) { Type = hitResult });
|
||||
}
|
||||
@ -166,7 +166,7 @@ namespace osu.Game.Rulesets.Taiko.Tests
|
||||
|
||||
var h = new DrawableTestHit(hit) { X = RNG.NextSingle(hitResult == HitResult.Good ? -0.1f : -0.05f, hitResult == HitResult.Good ? 0.1f : 0.05f) };
|
||||
|
||||
Add(h);
|
||||
drawableRuleset.Playfield.Add(h);
|
||||
|
||||
((TaikoPlayfield)drawableRuleset.Playfield).OnNewResult(h, new JudgementResult(new HitObject(), new TaikoJudgement()) { Type = hitResult });
|
||||
((TaikoPlayfield)drawableRuleset.Playfield).OnNewResult(new TestStrongNestedHit(h), new JudgementResult(new HitObject(), new TaikoStrongJudgement()) { Type = HitResult.Great });
|
||||
@ -175,7 +175,7 @@ namespace osu.Game.Rulesets.Taiko.Tests
|
||||
private void addMissJudgement()
|
||||
{
|
||||
DrawableTestHit h;
|
||||
Add(h = new DrawableTestHit(new Hit(), HitResult.Miss));
|
||||
drawableRuleset.Playfield.Add(h = new DrawableTestHit(new Hit(), HitResult.Miss));
|
||||
((TaikoPlayfield)drawableRuleset.Playfield).OnNewResult(h, new JudgementResult(new HitObject(), new TaikoJudgement()) { Type = HitResult.Miss });
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user