我正在使用 pygame
库在 Python 中进行编程。我想知道如何制作一个矩形变量,例如:
import ...
rect1 = #RECT VARIABLE
rect2 = #RECT VARIABLE
最佳答案
就这样
pygame.Rect(left, top, width, height)
这将在 pygame 中返回一个 Rect 对象
关于python - 你如何在 python pygame 中创建 rect 变量,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26831033/