public async Task LaunchAndSpectate(LoadedReplay loadedReplay) { await contextSetter.SetContextAsync(loadedReplay); await gameController.LaunchAsync(); if (settings.OBS.Enabled) { obsController.ConfigureFromContext(); obsController.SwapToGameScene(); obsController.StartRecording(); await spectator.SpectateAsync(); obsController.StopRecording(); gameController.Kill(); await obsController.CycleReportAsync(); obsController.SwapToWaitingScene(); } else { await spectator.SpectateAsync(); gameController.Kill(); } }
public async Task SpectateSessionAsync() { if (settings.OBS.Enabled) { await obsController.SwapToGameSceneAsync(); await session.SpectateAsync(); gameController.KillGame(); await replayFileWriter.ClearDetailsAsync(); if (sessionHolder.StormReplay.ReplayId.HasValue) { await obsController.CycleReportAsync(sessionHolder.StormReplay.ReplayId.Value); } await obsController.SwapToWaitingSceneAsync(); } else { await session.SpectateAsync(); gameController.KillGame(); await replayFileWriter.ClearDetailsAsync(); } await Task.Delay(settings.Spectate.WaitingTime); }