Added check for space bar press, outloined section for revolver code
This commit is contained in:
@ -17,7 +17,9 @@ GunSpin = pygame.mixer.Sound("sfx/gun-spin.mp3")
|
|||||||
screen = pygame.display.set_mode((screenw,screenh))
|
screen = pygame.display.set_mode((screenw,screenh))
|
||||||
MainSurface = pygame.Surface((screenw,screenh-yOffset))
|
MainSurface = pygame.Surface((screenw,screenh-yOffset))
|
||||||
clock = pygame.time.Clock()
|
clock = pygame.time.Clock()
|
||||||
|
|
||||||
running = True #you better start running...
|
running = True #you better start running...
|
||||||
|
startSpin = False
|
||||||
|
|
||||||
while running:
|
while running:
|
||||||
for event in pygame.event.get():
|
for event in pygame.event.get():
|
||||||
@ -30,8 +32,12 @@ while running:
|
|||||||
PlaySound(GunShot)
|
PlaySound(GunShot)
|
||||||
elif event.key == pygame.K_3:
|
elif event.key == pygame.K_3:
|
||||||
PlaySound(GunSpin)
|
PlaySound(GunSpin)
|
||||||
|
elif event.key == pygame.K_SPACE:
|
||||||
|
startSpin = True
|
||||||
|
|
||||||
|
#revolver code
|
||||||
|
|
||||||
|
#screen code
|
||||||
screen.fill("black")
|
screen.fill("black")
|
||||||
|
|
||||||
pygame.draw.rect(MainSurface, (30,30,30), (0,0,300,100))
|
pygame.draw.rect(MainSurface, (30,30,30), (0,0,300,100))
|
||||||
|
|||||||
Reference in New Issue
Block a user