private static void ProcessNewLines() { foreach (var item in ToProcess.Where(item => item.Value != null)) { if (_stop) { break; } foreach (var line in item.Value.Where(line => line != null)) { if (_stop) { break; } _game.GameTime.Time = line.Time; switch (line.Namespace) { case "Power": PowerLineHandler.Handle(line.Line, _gameState, _game); OnPowerLogLine.Execute(line.Line); break; case "Asset": AssetHandler.Handle(line.Line, _gameState, _game); OnAssetLogLine.Execute(line.Line); break; case "Bob": BobHandler.Handle(line.Line, _gameState, _game); OnBobLogLine.Execute(line.Line); break; case "Rachelle": RachelleHandler.Handle(line.Line, _gameState, _game); OnRachelleLogLine.Execute(line.Line); break; case "Arena": ArenaHandler.Handle(line.Line, _gameState, _game); OnArenaLogLine.Execute(line.Line); break; case "LoadingScreen": LoadingScreenHandler.Handle(line.Line, _gameState, _game); break; case "Net": NetHandler.Handle(line.Line, _gameState, _game); break; case "FullScreenFX": FullScreenFxHandler.Handle(line, _game); break; } } } ToProcess.Clear(); Helper.UpdateEverything(_game); }
private void OnNewLines(List <LogLine> lines) { foreach (var line in lines) { if (_stop) { break; } _game.GameTime.Time = line.Time; switch (line.Namespace) { case "Power": if (line.LineContent.StartsWith("GameState.")) { _game.PowerLog.Add(line.Line); } else { _powerLineHandler.Handle(line.Line, _gameState, _game); OnPowerLogLine.Execute(line.Line); } break; case "Rachelle": _rachelleHandler.Handle(line.Line, _gameState, _game); OnRachelleLogLine.Execute(line.Line); break; case "Arena": _arenaHandler.Handle(line, _gameState, _game); OnArenaLogLine.Execute(line.Line); break; case "LoadingScreen": _loadingScreenHandler.Handle(line, _gameState, _game); break; case "FullScreenFX": _fullScreenFxHandler.Handle(line, _game); break; } } Helper.UpdateEverything(_game); }