def game_intro():
intro = True
while intro:
for event in pygame.event.get():
if event.type == pygame.QUIT:
pygame.quit()
quit()
if event.type == pygame.KEYDOWN:
if event.key == pygame.K_c:
intro = False
if event.key == pygame.K_q:
pygame.quit()
quit()
gameDisplay.fill(white)
message_to_screen("Welcome to Tanks!",
green,
-100,
"large")
message_to_screen("The objective of the game is to shoot and destroy.",
black,
-30)
message_to_screen("the enemy tank before they destroy you.",
black,
10)
message_to_screen("The more enemies you destroy, the harder they get.",
black,
50)
button("play", 150, 500, 100, 50, green, light_green, action="play")
button("controls", 350, 500, 100, 50, yellow, light_yellow, action="controls")
button("quit", 550, 500, 100, 50, red, light_red, action="quit")
pygame.display.update()
clock.tick(15)
评论列表
文章目录