예제 #1
0
        private void scheduleStart(SpectatorGameplayState spectatorGameplayState)
        {
            // This function may be called multiple times in quick succession once the screen becomes current again.
            scheduledStart?.Cancel();
            scheduledStart = Schedule(() =>
            {
                if (this.IsCurrentScreen())
                {
                    start();
                }
                else
                {
                    scheduleStart(spectatorGameplayState);
                }
            });

            void start()
            {
                Beatmap.Value = spectatorGameplayState.Beatmap;
                Ruleset.Value = spectatorGameplayState.Ruleset.RulesetInfo;

                this.Push(new SpectatorPlayerLoader(spectatorGameplayState.Score, () => new SoloSpectatorPlayer(spectatorGameplayState.Score)));
            }
        }
예제 #2
0
 protected override void StartGameplay(int userId, SpectatorGameplayState spectatorGameplayState)
 => instances.Single(i => i.UserId == userId).LoadScore(spectatorGameplayState.Score);