Merge branch 'main' of https://git.personal.imadumbass.dog/Brosef/RussianRoulette
This commit is contained in:
@ -8,6 +8,7 @@ yOffset = 0
|
||||
pygame.init()
|
||||
|
||||
#Sounds for the gun :3
|
||||
PlaySound = pygame.mixer.Sound.play
|
||||
GunBlank = pygame.mixer.Sound("sfx/gun-blank.mp3")
|
||||
GunShot = pygame.mixer.Sound("sfx/gun-shot.mp3")
|
||||
GunSpin = pygame.mixer.Sound("sfx/gun-spin.mp3")
|
||||
@ -22,6 +23,14 @@ while running:
|
||||
for event in pygame.event.get():
|
||||
if event.type == pygame.QUIT:
|
||||
running = False
|
||||
elif event.type == pygame.KEYDOWN:
|
||||
if event.key == pygame.K_1:
|
||||
PlaySound(GunBlank)
|
||||
elif event.key == pygame.K_2:
|
||||
PlaySound(GunShot)
|
||||
elif event.key == pygame.K_3:
|
||||
PlaySound(GunSpin)
|
||||
|
||||
|
||||
screen.fill("black")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user