我正在制作一个游戏并将其转换为 Windows 上的 .exe,但是在运行时我看到我的 blit 看起来比平时更厚。我还注意到在使用我制作的菜单选择器时,当它们是同一张图片时,它会生成两张图片。这是它的样子https://youtu.be/GEh61ahTTPI
我尝试使菜单选择器更流畅,并尝试使用不同的图片文件。
Title = pygame.image.load('Graphics/Title.png')
Play = pygame.image.load('Graphics/Play.png')
Option = pygame.image.load('Graphics/Option.png')
Exit = pygame.image.load('Graphics/Exit.png')
LinePX = pygame.image.load('Graphics/LinePX.png')
LineO = pygame.image.load('Graphics/LineO.png')
clock = pygame.time.Clock()
screen = pygame.display.set_mode((1280, 720))
screen.fill((0,0,0))
screen.set_alpha(0)
black = pygame.image.load('Graphics/black.png')
controlstart = True
y = 235
y1 = 3000
xb = 10000
yb = 10000
cnt = 0
playing = True
while playing:
for event in pygame.event.get():
if controlstart == True:
if event.type == pygame.KEYDOWN:
if event.key==pygame.K_KP_ENTER or
event.key==pygame.K_RETURN:
pygame.mixer.music.stop()
pygame.mixer.Channel(2).play(enter_sfx)
y += 1
fade(1280, 720)
xb = 0
yb = 0
if y == 3236:
controlstart = False
if y == 436:
playing = False
pygame.quit()
quit()
if event.key == pygame.K_UP:
pygame.mixer.Channel(3).play(move_sfx)
y += 1
if y == 3236:
y = 235
y1 = 3000
if y == 236:
y = 435
y1 = 3000
if y == 436:
y1 =335
y = 3235
我希望输出一个普通菜单,而不是一个厚而有故障的菜单,但结果很奇怪。
哔哔one
相关分类