Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
在 pygame 中,我需要制作一个飞扬的鸟克隆。我需要制作循环管道,所以我想通过每隔几秒钟在屏幕末尾绘制新管道来做到这一点。我知道有一个 pygame.set_timer 函数但是我如何实现它以便它以秒为单位计数并每隔几秒绘制一次
如果您发布了整个代码,我可能会为您提供帮助。由于您没有发布代码,因此您应该尝试这样的事情。
import time while True: if (bird went past tube): return True ...create(...) else: return False