Open Flagnac opened 4 years ago
I installed pgzero and tryed the following Code:
` import pgzrun
alien = Actor('alien') alien.pos = 100, 56
WIDTH = 500 HEIGHT = alien.height + 20
def draw(): screen.clear() alien.draw()
pgzrun.go() `
Its an example from the pgzero-site. But everytime i got this Error : NameError: name 'Actor' is not defined
I tryed it with diffrent commented import styles but it still doesnt work. Thank you for helping:)
One more thing: I´m using Spyder.
Add from pgzero.builtins import Actor, animate, keyboard at the top.
from pgzero.builtins import Actor, animate, keyboard
I installed pgzero and tryed the following Code:
` import pgzrun
from pgzrun import *
from pgzrun import Actor
alien = Actor('alien') alien.pos = 100, 56
WIDTH = 500 HEIGHT = alien.height + 20
def draw(): screen.clear() alien.draw()
pgzrun.go() `
Its an example from the pgzero-site. But everytime i got this Error : NameError: name 'Actor' is not defined
I tryed it with diffrent commented import styles but it still doesnt work. Thank you for helping:)
One more thing: I´m using Spyder.