1
Fork 0

Changed shooting occurance

This commit is contained in:
Jake Howard 2015-05-11 14:28:39 +01:00
parent 08e21b471a
commit 68f5d76512

View file

@ -126,6 +126,7 @@ def play(window):
if keys[pygame.K_KP4] and keys[pygame.K_KP5] and keys[pygame.K_KP6] and player.OP: if keys[pygame.K_KP4] and keys[pygame.K_KP5] and keys[pygame.K_KP6] and player.OP:
temp = Bullet(player) temp = Bullet(player)
bullet_group.add(temp) bullet_group.add(temp)
if keys[pygame.K_r] and [pygame.K_9] and [pygame.K_k] and player.OP: if keys[pygame.K_r] and [pygame.K_9] and [pygame.K_k] and player.OP:
eggs.r9k(window) eggs.r9k(window)
@ -171,7 +172,7 @@ def play(window):
for target in target_group: for target in target_group:
if target.type == "SHOOTER": if target.type == "SHOOTER":
if randint(0,400) > 1: continue if randint(0,375) > 1: continue
temp = Bullet(target) temp = Bullet(target)
temp.type="TARGET" temp.type="TARGET"
temp.speed = -3 #So it shoots down! temp.speed = -3 #So it shoots down!
@ -181,6 +182,7 @@ def play(window):
player.level += 1 player.level += 1
target_group = generate_targets(player) target_group = generate_targets(player)
player.change_colour(player.colours[player.level]) player.change_colour(player.colours[player.level])
target_group.draw()
pygame.display.update() pygame.display.update()
sleep(1.5) sleep(1.5)