private void load(GameHost host, OsuGameBase gameBase) { OsuGame game = new OsuGame(); game.SetHost(host); Children = new Drawable[] { game }; }
private void load(GameHost host, OsuGameBase gameBase) { OsuGame game = new OsuGame(); game.SetHost(host); Children = new Drawable[] { new Box { RelativeSizeAxes = Axes.Both, Colour = Color4.Black, }, game }; }
private void load(GameHost host) { game = new OsuGame(); game.SetHost(host); Children = new Drawable[] { new Box { RelativeSizeAxes = Axes.Both, Colour = Color4.Black, }, game }; AddUntilStep("wait for load", () => game.IsLoaded); }
private void load(GameHost host, OsuGameBase gameBase) { OsuGame game = new OsuGame(); game.SetHost(host); Children = new Drawable[] { new Box { RelativeSizeAxes = Axes.Both, Colour = Color4.Black, }, game }; AddUntilStep("wait for load", () => game.IsLoaded); AddAssert("check OsuGame DI members", () => { foreach (var type in requiredGameDependencies) { if (game.Dependencies.Get(type) == null) { throw new Exception($"{type} has not been cached"); } } return(true); }); AddAssert("check OsuGameBase DI members", () => { foreach (var type in requiredGameBaseDependencies) { if (gameBase.Dependencies.Get(type) == null) { throw new Exception($"{type} has not been cached"); } } return(true); }); }
public void SetUpSteps() { AddStep("create game", () => { game = new OsuGame(); game.SetHost(host); Children = new Drawable[] { new Box { RelativeSizeAxes = Axes.Both, Colour = Color4.Black, }, game }; }); AddUntilStep("wait for load", () => game.IsLoaded); }
private void load(GameHost host) { OsuGame game = new OsuGame(); game.SetHost(host); Children = new Drawable[] { new Box { RelativeSizeAxes = Axes.Both, Colour = Color4.Black, }, game }; AddUntilStep("wait for load", () => game.IsLoaded); AddAssert("check OsuGame DI members", () => requiredGameDependencies.All(d => game.Dependencies.Get(d) != null)); AddAssert("check OsuGameBase DI members", () => requiredGameBaseDependencies.All(d => Dependencies.Get(d) != null)); }