Skip to content
Snippets Groups Projects
Commit 19e68e75 authored by Jantz's avatar Jantz
Browse files

Rounds end now when all round enemies have spawned and died.

parent a1f27045
No related branches found
No related tags found
No related merge requests found
......@@ -15,9 +15,8 @@
########################################################################
import pygame as pg
import time, math
import time
from world import World
from turret import Turret
from gui import GUI
def main():
......@@ -85,6 +84,10 @@ def main():
# Turret logic
world.turret_attacks(dt)
# If spawn list is empty and no enemies left, end the round
if len(world.round_spawn_times) == 0 and len(world.enemies) == 0:
world.round_active = False
if world.request_to_start_round:
world.current_round += 1
world.round_spawn_times = world.generate_enemy_spawn_times(world.current_round)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment