Python 我制作了一个非常简单的Pygame Zero游戏,但是我的演员图像和屏幕.clear()不起作用。你能帮我修一下吗?
这是非常糟糕的游戏示例的完整代码Python 我制作了一个非常简单的Pygame Zero游戏,但是我的演员图像和屏幕.clear()不起作用。你能帮我修一下吗?,python,pgzero,Python,Pgzero,这是非常糟糕的游戏示例的完整代码 import pgzrun from random import randint from pgzero.builtins import Actor, animate, keyboard apple = Actor('apple') def draw(): screen.clear() apple.draw() def place_apple(): apple.x = randint(10, 800) apple.y = r
import pgzrun
from random import randint
from pgzero.builtins import Actor, animate, keyboard
apple = Actor('apple')
def draw():
screen.clear()
apple.draw()
def place_apple():
apple.x = randint(10, 800)
apple.y = randint(10, 600)
def on_mouse_down(pos):
if apple.collidepont(pos):
print("Good shot!")
place_apple()
else:
print("You missed!")
quit()
place_apple()
pgzrun.go()
screen.clear()不工作,apple=actor(“苹果”)也不工作。我不知道为什么。请帮帮我 事实并非如此。你必须使用标签而不是标签。