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.
我正在用python制作一个简单的游戏。不幸的是,精灵图像太小了。如何将精灵图像(GrassTile)从 8x8 增加到 16x16。我不太确定如何使用转换模块。
我已经尝试过了
pygame.transform.scale(grasstile, (16, 16), DestSurface = None): return grasstile
并得到一个无效的语法
像这样调用你的函数:
biggrasstile = pygame.transform.scale(grasstile, (16, 16))
(看起来你只是复制了方法签名)