[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[pygame] Question about Pygame.event.wait and pygame.mixer.get_busy
- To: pygame-users@xxxxxxxx
- Subject: [pygame] Question about Pygame.event.wait and pygame.mixer.get_busy
- From: Áron Ócsvári <oaron1@xxxxxxxxx>
- Date: Mon, 06 Jun 2011 09:21:19 +0200
- Delivered-to: archiver@xxxxxxxx
- Delivered-to: pygame-users-outgoing@xxxxxxxx
- Delivered-to: pygame-users@xxxxxxxx
- Delivery-date: Mon, 06 Jun 2011 03:21:05 -0400
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:message-id:date:from:user-agent:mime-version:to :subject:content-type:content-transfer-encoding; bh=uMBc++SGexcHt6ZEDAHM2bLSd79qvjoyH0Z7bPRTpT8=; b=kenSzzainSqRvxphokPsbu9IEVKN5pCB8+14DjoYadnHK8erI0VPW2wT603QOshPYI /vRUbBZfGbTA0amuPTtJxQGXOtS2GGUstohStAX5tF5WsXvK1oBozyGsXedVeKQs+vI0 mhqT0Ub6Cf5mkhNwZnhGfvTETF2TMlMggM1/Y=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:subject :content-type:content-transfer-encoding; b=x9wMH5X0HG+VvvDer1OCVIKKGK1iNPn7atMLygwdUUtufZnLlcOBHHCMiI0a8SX5Yl CAUr54rcoc79MF0pSrmN6QT80mF1UHCt2JZ9fw6CSGbnVHw9dizExoxfgLIRgRqX8AvU +fQXRktKIVI312tQULjOr+cPzSAvXxPgj1aC8=
- Reply-to: pygame-users@xxxxxxxx
- Sender: owner-pygame-users@xxxxxxxx
- User-agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; hu; rv:1.9.2.17) Gecko/20110414 Thunderbird/3.1.10
Hello,
I make a game in Python with Pygame. I'm using Python 2.6, but I think
It is not important in this case. When the game starts, an intro sound
plays. When the player press escape key, the intro fades, and comes up
the game's main menu. If the sound is finished, the main menu doesn't
come up, while I don't press a key. What is the problem? The code is the
following:
while (pygame.mixer.get_busy()):
esemeny =pygame.event.wait()
if esemeny.type == pygame.KEYDOWN:
if (esemeny.key ==pygame.K_ESCAPE):
pygame.mixer.fadeout(1000)
return belep
return belep
Thanks for your help.
Regards,
Aron