如何修复此 DeprecationWarning

How to fix this DeprecationWarning

DeprecationWarning: an integer is required (got type float). Implicit conversion to integers using int is deprecated, and may be removed in a future version of Python.

win.blit(playerStand, (x, y))

DeprecationWarning: an integer is required (got type float). Implicit conversion to integers using int is deprecated, and may be removed in a future version of Python.

win.blit(walkLeft[animCount // 5], (x, y))

警告与 blit(). Floating point coordinates, would mean that the origin of the Surface 的坐标参数有关,该参数介于 window 的像素之间。那没有多大意义。坐标会自动隐式截断,并由警告指示。
使用 int or round 将浮点坐标转换为整数:

win.blit(playerStand, (round(x), round(y)))

该消息也会出现显式转换,因此,为了安全起见,请执行以下操作:

a = round(x)
b = round(y)
win.blit(playerStand, (a, b))

W1JGH