本文整理汇总了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)
示例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)