def __init__(self): """sets up the game variables and then initializes its employee agents""" super(GameManager, self).__init__("game_manager") self.house = Environment() self.screen = None # screen size self.screen_height = 444 self.screen_width = 1116 self.running_game = True # player list self.player_list = pygame.sprite.Group() self.house.add_object("player_list", self.player_list) # holds bullet list self.bullet_list = pygame.sprite.Group() self.house.add_object("bullet_list", self.bullet_list) # holds the sprites that make up the wall self.wall_list = pygame.sprite.Group() self.house.add_object("wall_list", self.wall_list) # holds the objects that are placed in the environment for Neo to interact with self.object_list = pygame.sprite.Group() self.house.add_object("object_list", self.object_list) # this holds the awesome laser beams that Neo shoots from his face self.raycast_list = pygame.sprite.Group() self.house.add_object("raycast_list", self.raycast_list) # initialize agents and place them in the environment self.map_builder = MapBuilder(self.house) self.neo = NEO(self.house) self.blue_player_pilot = BluePlayerPilot(self.house)
def __init__(self): """sets up the game variables and then initializes its employee agents""" super(GameManager, self).__init__("game_manager") self.play_window = Environment() self.screen = None # screen size self.screen_height = 444 self.screen_width = 1116 self.running_game = True # player list self.player_list = pygame.sprite.Group() self.play_window.add_object("player_list", self.player_list) # holds bullet list self.bullet_list = pygame.sprite.Group() self.play_window.add_object("bullet_list", self.bullet_list) # holds the sprites that make up the wall self.wall_list = pygame.sprite.Group() self.play_window.add_object("wall_list", self.wall_list) # initialize agents and place them in the environment self.map_builder = MapBuilder(self.play_window) self.red_ai_pilot = RedAiPilot(self.play_window) self.blue_player_pilot = BluePlayerPilot(self.play_window)