|
|
马上注册,结交更多好友,享用更多功能^_^
您需要 登录 才可以下载或查看,没有账号?立即注册
x
while True:
for event in pygame.event.get():
if event.type == QUIT:
terminate()
elif event.type == KEYDOWN: #按键
if(event.key == K_LEFT or event.key == K_a) and direction !=RIGHT:
direction = LEFT
elif (event.key == K_RIGHT or event.key == K_d) and direction!= LEFT:
direction = RIGHT
elif(event.key == K_DOWN or event.key == K_s) and direction!= DOWN:
direction = DOWN
elif(event.key == K_UP or event.key == K_w) and direction!= UP:
direction = UP
elif event.key == K_ESCAPE:
terminate()
for event in pygame.event.get():
pygame.error: video system not initialized
求教为什么以及怎么解决,感谢
真的是很无奈啊,可能是需要加装一个什么东西吧,家里三台电脑都试过了还是不行
困扰我一个晚上了,拜托拜托 |
|