请教一下关于pygame的问题

就是这一段我按了o可以显示图片,然后按p没有动反而图片消失了,图片和矩形的加载我没有打上来
bg_jian=pygame.image.load(“bin/jian.png”).convert_alpha()

    if event.type == KEYDOWN:

        if event.key == K_o:
    
            jians = pygame.Rect(player.x   player.width   50, player.y   player.height,5,5)

            pygame.draw.rect(screen,white,jians)

            screen.blit(bg_jian, (jians.x jians.width - 45, jians.y jians.height - 10))

        elif event.key == K_p:

            jians.right  = MOVESPEED       

你可能感兴趣的:(笔记)