我目前正在为python3.2.3和pygame中的游戏渲染字体。我当前收到错误:
Traceback (most recent call last):
File "E:\FinalProject.py", line 249, in <module>
drawLevel1(screen, guy)
File "E:\FinalProject.py", line 107, in drawLevel1
text = font.render("Level : %s" % (lvlNum), 1, (0,0,0))
AttributeError: 'module' object has no attribute 'render'
代码如下:
^{pr2}$我不知道为什么会发生这个错误。如有任何帮助,我们将不胜感激。在
代替使用
pygame.font.SysFont("Grobold", 20)
,您可能需要:相关问题 更多 >
编程相关推荐