python游戏
年中初界
这个作者很懒,什么都没留下…
展开
-
python:外星人入侵项目:添加飞船图像失败FileNotFoundError: No such file or directory.解决方法
错误代码: self.image = pygame.image.load('images/ship.bmp')报错:解决措施:方法一:补全路径(我用的Linux系统,没有成功)方法二:1) 利用pycharm中的终端,切换目录一直到项目文件夹下;2) 执行目标文件...原创 2021-03-29 00:46:58 · 1705 阅读 · 0 评论 -
pycharm导入pygame运行程序后不显示弹窗,报错TypeError: argument 1 must be 2-item sequence, not int
以下为错误代码:screen = pygame.display.set_mode(settings.screen_wideth, settings.screen_height)此处为pycharm运行结果报错:pygame 2.0.1 (SDL 2.0.14, Python 3.8.5)Hello from the pygame community. https://www.pygame.org/contribute.htmlTraceback (most recent call las.原创 2021-03-27 22:40:26 · 1987 阅读 · 0 评论