首页 > 解决方案 > Pygame Zero 中 Actor 函数的“pos”不起作用

问题描述

我正在使用 Pygame Zero 库在 Python 3.9 中学习编程游戏,并且我正在使用 PyCharm Community Edition 2020.3。
我的代码和视频课程中的一模一样(我用的是文本比较网站,没有发现差异),但是编译运行程序后的效果是不同的。from Actor 功能不起作用
pos无论我输入什么值xy坐标,都没有区别。
但是anchor工作正常。

trunk_unusued = Actor('pien_solo')
trunk = Actor('pien_solo', pos=(WIDTH/2, 0), anchor=(trunk_unusued.width/2, 0))

标签: pythonpycharmactorpgzero

解决方案


推荐阅读