python - Pygame Zero 中 Actor 函数的“pos”不起作用
问题描述
我正在使用 Pygame Zero 库在 Python 3.9 中学习编程游戏,并且我正在使用 PyCharm Community Edition 2020.3。
我的代码和视频课程中的一模一样(我用的是文本比较网站,没有发现差异),但是编译运行程序后的效果是不同的。from Actor 功能不起作用
。pos
无论我输入什么值x
和y
坐标,都没有区别。
但是anchor
工作正常。
trunk_unusued = Actor('pien_solo')
trunk = Actor('pien_solo', pos=(WIDTH/2, 0), anchor=(trunk_unusued.width/2, 0))
解决方案
推荐阅读
- python - 如何使用 Qt 获取视频缩略图
- java - 使用 vertx-jooq-classic-reactive: 5.0.1 编写期货时出现错误连接未打开关闭
- c# - 函数应用程序给出异常 HTTP 错误 500.30 - ANCM 进程中启动失败
- html - 元素的宽度取决于另一个元素的宽度 - 没有 JavaScript
- swift - SwiftUI 导航栏即使隐藏也有多余空间
- sql-server - 如何在 SQL Server 中保存更改?
- c# - HashSet 中的哈希性能
针对列表 包含 - c# - ServiceChannel Object is more in memory dump of webapi
- flutter - 无法从静态方法 dart 访问实例成员
- java - Why is this legal in Java? Queue
waitingQueue = new LinkedList<>();