Example #1
0
        private void load(GameHost host, OsuGameBase gameBase)
        {
            OsuGame game = new OsuGame();

            game.SetHost(host);

            Children = new Drawable[]
            {
                game
            };
        }
Example #2
0
        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
            };
        }
Example #3
0
        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);
        }
Example #4
0
        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);
            });
        }
Example #5
0
        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);
        }
Example #6
0
        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));
        }