def process_queue(self, ticks_per_sec):
"""Process the entire queue while taking periodic breaks. This allows
the game loop to run smoothly. The queue contains calls to
_show_block() and _hide_block() so this method should be called if
add_block() or remove_block() was called with immediate=False
"""
start = time.clock()
while self.show_hide_queue and time.clock() - start < 1.0 / ticks_per_sec:
self._dequeue()
评论列表
文章目录