|
马上注册,结交更多好友,享用更多功能^_^
您需要 登录 才可以下载或查看,没有账号?立即注册
x
差在哪??
import pygame
from plane_sprites import *
pygame.init()
screen = pygame.display.set_mode((480,700))
bg = pygame.image.load("./images/background.png")
screen.blit(bg,(0,0))
#pygame.display.update()
f = pygame.image.load("./images/me1.png")
screen.blit(f, (200, 500))
pygame.display.update()
clock = pygame.time.Clock()
hero_rect = pygame.Rect(150,300,102,126)
enemy = GameSprite("./images/enemy1.png")
enemy1 = GameSprite("./images/enemy1.png",2)
enemy_group = pygame.sprite.Group(enemy)
while True:
clock.tick(30)
for event in pygame.event.get():
if event.type == pygame.QUIT:
print("游戏结束。。。")
pygame.quit()
exit()
hero_rect.y -= 5
if hero_rect.y <= -100:
hero_rect.y = 700
screen.blit(bg,(0,0))
screen.blit(f,hero_rect)
pygame.display.update()
Traceback (most recent call last):
File "C:/Users/tlan2/Desktop/真·飞机大战/01.py", line 2, in <module>
from plane_sprites import *
ModuleNotFoundError: No module named 'plane_sprites'
Process finished with exit code 1
报错写那了:没有找到 plane_sprites 模块
看看你的文件名对不对,检查检查,可能是 place_sprites 吧?
|
|