Fix HitObject test case not displaying properly.

This commit is contained in:
Dean Herbert 2016-12-07 18:18:36 +09:00
parent 83e7e67cc5
commit 87ad44b901
2 changed files with 6 additions and 2 deletions

View File

@ -22,7 +22,7 @@ namespace osu.Desktop.VisualTests.Tests
public TestCaseHitObjects() public TestCaseHitObjects()
{ {
var swClock = new StopwatchClock(true) { Rate = 1 }; var swClock = new StopwatchClock(true) { Rate = 0.2f };
Clock = new FramedClock(swClock); Clock = new FramedClock(swClock);
} }
@ -52,8 +52,10 @@ namespace osu.Desktop.VisualTests.Tests
Origin = Anchor.Centre, Origin = Anchor.Centre,
Depth = i, Depth = i,
State = ArmedState.Hit, State = ArmedState.Hit,
Judgement = new OsuJudgementInfo { Result = HitResult.Hit }
}; };
approachContainer.Add(d.ApproachCircle.CreateProxy()); approachContainer.Add(d.ApproachCircle.CreateProxy());
Add(d); Add(d);
} }

View File

@ -47,7 +47,9 @@ namespace osu.Game.Modes.Objects.Drawables
{ {
base.LoadComplete(); base.LoadComplete();
Judgement = CreateJudgementInfo(); //we may be setting a custom judgement in test cases or what not.
if (Judgement == null)
Judgement = CreateJudgementInfo();
//force application of the state that was set before we loaded. //force application of the state that was set before we loaded.
UpdateState(State); UpdateState(State);