|
马上注册,结交更多好友,享用更多功能^_^
您需要 登录 才可以下载或查看,没有账号?立即注册
x
这是代码
import pygame
pygame.init()
screen = pygame.display.set_mode((480, 700))
bg = pygame.image.load(r"*\background.png")
screen.blit(bg, (0, 0))
hero = pygame.image.load(r"*\me1.png")
screen.blit(hero, (100, 500))
pygame.display.update()
clock = pygame.time.Clock()
hero_rect = pygame.Rect(100, 500, 102, 126)
while True:
clock.tick(60)
for event in pygame.event.get():
if event.type == pygame.QUIT:
pygame.quit()
hero_rect.y -= 1
if hero_rect.y <= -126:
hero_rect.y = 700
screen.blit(bg, (0, 0))
screen.blit(hero, hero_rect)
pygame.display.update()
pygame.quit()
下面是显示的错误
for event in pygame.event.get():
pygame.error: video system not initialized
libpng warning: iCCP: known incorrect sRGB profile |
|