def process_events(self):
""" Processes mouse events and quit event """
for event in pygame.event.get():
if event.type == pygame.QUIT:
self.stopped = True
self.render_thread.join()
self.game_controller.cleanup()
sys.exit()
elif event.type == pygame.MOUSEBUTTONUP:
self.process_mouse_event(False, self.is_double_click())
elif event.type == pygame.MOUSEBUTTONDOWN:
self.process_mouse_event(True)
评论列表
文章目录