示例#1
0
        public override void SetUpSteps()
        {
            base.SetUpSteps();

            AddStep("import beatmap", () =>
            {
                beatmaps.Import(TestResources.GetQuickTestBeatmapForImport()).Wait();
                importedSet = beatmaps.GetAllUsableBeatmapSetsEnumerable(IncludedDetails.All).First();
            });

            AddStep("create multiplayer screen", () => multiplayerScreen = new TestMultiplayer());

            AddStep("load dependencies", () =>
            {
                client = new TestMultiplayerClient(multiplayerScreen.RoomManager);

                // The screen gets suspended so it stops receiving updates.
                Child = client;

                LoadScreen(dependenciesScreen = new DependenciesScreen(client));
            });

            AddUntilStep("wait for dependencies screen", () => Stack.CurrentScreen is DependenciesScreen);
            AddUntilStep("wait for dependencies to start load", () => dependenciesScreen.LoadState > LoadState.NotLoaded);
            AddUntilStep("wait for dependencies to load", () => dependenciesScreen.IsLoaded);

            AddStep("load multiplayer", () => LoadScreen(multiplayerScreen));
            AddUntilStep("wait for multiplayer to load", () => multiplayerScreen.IsLoaded);
            AddUntilStep("wait for lounge to load", () => this.ChildrenOfType <MultiplayerLoungeSubScreen>().FirstOrDefault()?.IsLoaded == true);
        }
示例#2
0
        public override void SetUpSteps()
        {
            base.SetUpSteps();

            AddStep("import beatmap", () =>
            {
                beatmaps.Import(TestResources.GetQuickTestBeatmapForImport()).Wait();
                importedSet = beatmaps.GetAllUsableBeatmapSetsEnumerable(IncludedDetails.All).First();
            });

            AddStep("create multiplayer screen", () => multiplayerScreen = new TestMultiplayer());

            AddStep("load dependencies", () =>
            {
                client = new TestMultiplayerClient(multiplayerScreen.RoomManager);

                // The screen gets suspended so it stops receiving updates.
                Child = client;

                LoadScreen(dependenciesScreen = new DependenciesScreen(client));
            });

            AddUntilStep("wait for dependencies to load", () => dependenciesScreen.IsLoaded);

            AddStep("load multiplayer", () => LoadScreen(multiplayerScreen));
            AddUntilStep("wait for multiplayer to load", () => multiplayerScreen.IsLoaded);
        }
示例#3
0
        public TestSceneMultiplayer()
        {
            var multi = new TestMultiplayer();

            AddStep("show", () => LoadScreen(multi));
            AddUntilStep("wait for loaded", () => multi.IsLoaded);
        }
示例#4
0
        private void loadMultiplayer()
        {
            AddStep("show", () =>
            {
                multiplayerScreen = new TestMultiplayer();

                // Needs to be added at a higher level since the multiplayer screen becomes non-current.
                Child = multiplayerScreen.Client;

                LoadScreen(multiplayerScreen);
            });

            AddUntilStep("wait for loaded", () => multiplayerScreen.IsLoaded);
        }
示例#5
0
        public TestMultiplayerScreenStack()
        {
            multiplayerScreen = new TestMultiplayer();

            InternalChildren = new Drawable[]
            {
                Client      = new TestMultiplayerClient(RoomManager),
                screenStack = new OsuScreenStack {
                    RelativeSizeAxes = Axes.Both
                }
            };

            screenStack.Push(multiplayerScreen);
        }
        public TestMultiplayerComponents()
        {
            multiplayerScreen = new TestMultiplayer();

            InternalChildren = new Drawable[]
            {
                userLookupCache,
                beatmapLookupCache,
                MultiplayerClient = new TestMultiplayerClient(RoomManager),
                screenStack       = new OsuScreenStack
                {
                    Name             = nameof(TestMultiplayerComponents),
                    RelativeSizeAxes = Axes.Both
                }
            };

            screenStack.Push(multiplayerScreen);
        }
示例#7
0
        private void loadMultiplayer()
        {
            AddStep("create multiplayer screen", () => multiplayerScreen = new TestMultiplayer());

            AddStep("load dependencies", () =>
            {
                client = new TestMultiplayerClient(multiplayerScreen.RoomManager);

                // The screen gets suspended so it stops receiving updates.
                Child = client;

                LoadScreen(dependenciesScreen = new DependenciesScreen(client));
            });

            AddUntilStep("wait for dependencies to load", () => dependenciesScreen.IsLoaded);

            AddStep("load multiplayer", () => LoadScreen(multiplayerScreen));
            AddUntilStep("wait for multiplayer to load", () => multiplayerScreen.IsLoaded);
        }