1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-14 17:17:24 +08:00

Remove unused GameHost DI in OsuGameTestScene

This commit is contained in:
Dean Herbert 2021-09-13 19:38:43 +09:00
parent 24ae530a80
commit d999c29d3a

View File

@ -30,8 +30,6 @@ namespace osu.Game.Tests.Visual
/// </summary> /// </summary>
public abstract class OsuGameTestScene : OsuManualInputManagerTestScene public abstract class OsuGameTestScene : OsuManualInputManagerTestScene
{ {
private GameHost host;
protected TestOsuGame Game; protected TestOsuGame Game;
protected override bool UseFreshStoragePerRun => true; protected override bool UseFreshStoragePerRun => true;
@ -39,10 +37,8 @@ namespace osu.Game.Tests.Visual
protected override bool CreateNestedActionContainer => false; protected override bool CreateNestedActionContainer => false;
[BackgroundDependencyLoader] [BackgroundDependencyLoader]
private void load(GameHost host) private void load()
{ {
this.host = host;
Child = new Box Child = new Box
{ {
RelativeSizeAxes = Axes.Both, RelativeSizeAxes = Axes.Both,
@ -55,7 +51,7 @@ namespace osu.Game.Tests.Visual
{ {
AddStep("Create new game instance", () => AddStep("Create new game instance", () =>
{ {
if (Game != null) if (Game?.Parent != null)
{ {
Remove(Game); Remove(Game);
Game.Dispose(); Game.Dispose();