|
|
@ -44,14 +44,21 @@ def play(): |
|
|
|
########################## LAYER 0 END |
|
|
|
########################## LAYER 0 END |
|
|
|
|
|
|
|
|
|
|
|
########################## LAYER 1 |
|
|
|
########################## LAYER 1 |
|
|
|
slowsurf.place(window) |
|
|
|
if slowsurf.switch == True: |
|
|
|
if slowsurf.collide(player.player_rect): |
|
|
|
slowsurf.place(window) |
|
|
|
enemy.vel -= 0.1 |
|
|
|
if slowsurf.collide(player.player_rect): |
|
|
|
enemy2.vel -= 0.1 |
|
|
|
print("Colliding !") |
|
|
|
print("Colliding !") |
|
|
|
slowsurf.switch = False |
|
|
|
else: |
|
|
|
else: |
|
|
|
enemy.vel = 3 |
|
|
|
if slowsurf.timer >= 0: |
|
|
|
enemy2.vel = 3 |
|
|
|
slowsurf.timer -= 1 |
|
|
|
|
|
|
|
enemy.vel = 3 - 2 |
|
|
|
|
|
|
|
enemy2.vel = 3 - 2 |
|
|
|
|
|
|
|
enemy.bul_cooldown += 1.5 |
|
|
|
|
|
|
|
enemy2.bul_cooldown += 1.5 |
|
|
|
|
|
|
|
else: |
|
|
|
|
|
|
|
enemy.vel = 3 |
|
|
|
|
|
|
|
enemy2.vel = 3 |
|
|
|
|
|
|
|
|
|
|
|
player.teleportation() |
|
|
|
player.teleportation() |
|
|
|
player.shoot(window) |
|
|
|
player.shoot(window) |
|
|
@ -101,7 +108,7 @@ def play(): |
|
|
|
break |
|
|
|
break |
|
|
|
########################## LAYER 2 END |
|
|
|
########################## LAYER 2 END |
|
|
|
|
|
|
|
|
|
|
|
########################## LAYER 3 |
|
|
|
########################## LAYER 3 |
|
|
|
score_font = font.render(str(SCORE), True, (114, 150, 47)) |
|
|
|
score_font = font.render(str(SCORE), True, (114, 150, 47)) |
|
|
|
window.blit(score_font,(100,100)) |
|
|
|
window.blit(score_font,(100,100)) |
|
|
|
########################## LAYER 3 END |
|
|
|
########################## LAYER 3 END |
|
|
|