當前位置: 首頁>>代碼示例>>Python>>正文


Python Parser.parse_player_reaction_time方法代碼示例

本文整理匯總了Python中parsing.parser.Parser.parse_player_reaction_time方法的典型用法代碼示例。如果您正苦於以下問題:Python Parser.parse_player_reaction_time方法的具體用法?Python Parser.parse_player_reaction_time怎麽用?Python Parser.parse_player_reaction_time使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在parsing.parser.Parser的用法示例。


在下文中一共展示了Parser.parse_player_reaction_time方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。

示例1: parse_spawn

# 需要導入模塊: from parsing.parser import Parser [as 別名]
# 或者: from parsing.parser.Parser import parse_player_reaction_time [as 別名]
 def parse_spawn(self, file: str, match_i: int, spawn_i: int):
     """
     Either starts the results of ALL spawns found in the specified
     match or just one of them and displays the results in the other
     frames accordingly.
     """
     print("[FileFrame] Parsing '{}', match {}, spawn {}".format(file, match_i, spawn_i))
     self.main_window.middle_frame.statistics_numbers_var.set("")
     self.main_window.ship_frame.ship_label_var.set("No match or spawn selected yet.")
     lines = Parser.read_file(file)
     player_list = Parser.get_player_id_list(lines)
     player_name = Parser.get_player_name(lines)
     file_cube, match_timings, spawn_timings = Parser.split_combatlog(lines, player_list)
     match = file_cube[match_i]
     spawn = match[spawn_i]
     results = list(spawnstats.spawn_statistics(
         file, spawn, spawn_timings[match_i][spawn_i]))
     results[1] = Parser.parse_player_reaction_time(spawn, player_name)
     orig = len(results[1])
     results[1] = ScreenParser.build_spawn_events(
         file, match_timings[::2][match_i], spawn_timings[match_i][spawn_i], spawn, player_name)
     print("[FileFrame] ScreenParser built {} events. Total: {}".format(len(results[1]) - orig, len(results[1])))
     self.update_widgets_spawn(*results)
     arguments = (file, match_timings[::2][match_i], spawn_timings[match_i][spawn_i])
     string = FileHandler.get_features_string(*arguments)
     self.main_window.middle_frame.screen_label_var.set(string)
     self.main_window.middle_frame.update_timeline(
         file, match_i, spawn_i, match_timings, spawn_timings, file_cube)
     match_timing = datetime.combine(Parser.parse_filename(file).date(), match_timings[::2][match_i].time())
     self.main_window.middle_frame.scoreboard.update_match(match_timing)
開發者ID:RedFantom,項目名稱:GSF-Parser-Public,代碼行數:32,代碼來源:file.py

示例2: parse_spawn

# 需要導入模塊: from parsing.parser import Parser [as 別名]
# 或者: from parsing.parser.Parser import parse_player_reaction_time [as 別名]
 def parse_spawn(self, elements):
     """
     Either starts the parsing of ALL spawns found in the specified
     match or just one of them and displays the results in the other
     frames accordingly.
     """
     self.clear_data_widgets()
     self.main_window.middle_frame.statistics_numbers_var.set("")
     self.main_window.ship_frame.ship_label_var.set("No match or spawn selected yet.")
     file_name, match_index, spawn_index = elements[0], int(elements[1]), int(elements[2])
     lines = Parser.read_file(file_name)
     player_list = Parser.get_player_id_list(lines)
     player_name = Parser.get_player_name(lines)
     file_cube, match_timings, spawn_timings = Parser.split_combatlog(lines, player_list)
     match = file_cube[match_index]
     spawn = match[spawn_index]
     results = list(spawnstats.spawn_statistics(
         file_name, spawn, spawn_timings[match_index][spawn_index]))
     results[1] = Parser.parse_player_reaction_time(spawn, player_name)
     orig = len(results[1])
     results[1] = ScreenParser.build_spawn_events(
         file_name, match_timings[::2][match_index], spawn_timings[match_index][spawn_index], spawn, player_name)
     print("[FileFrame] ScreenParser built {} events. Total: {}".format(len(results[1]) - orig, len(results[1])))
     self.update_widgets_spawn(*results)
     arguments = (file_name, match_timings[::2][match_index], spawn_timings[match_index][spawn_index])
     string = FileHandler.get_features_string(*arguments)
     self.main_window.middle_frame.screen_label_var.set(string)
     self.main_window.middle_frame.update_timeline(
         file_name, match_index, spawn_index, match_timings, spawn_timings, file_cube)
開發者ID:RedFantom,項目名稱:GSF-Parser-Public,代碼行數:31,代碼來源:fileframe.py


注:本文中的parsing.parser.Parser.parse_player_reaction_time方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。