def __init__(self, surface, enemy_manager): """Constructor""" self.surface = surface self.enemy_manager = enemy_manager self.terrain_objects = [] self.gun_objects = [] self.enemies = [] self.end_of_level = False self.collide_flag = False self.counter = 0 self.collide = CollisionManager() # Level ASCII keys self.level_one_key = "////////////////////////////////////////////////////////////" \ "///////////////////////////SSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSS/" \ "///////////////////////////SSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSS/" \ "///////////////////////////SSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSS/" \ "///////////////////////////SSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSS/" \ "///////////////////////////SSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSS/" \ "/SSSSSSSSSSSSSSSSSSSSS/////SSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSS/" \ "/SSSSSSSSSSXSSSSSSSSSS/////SSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSS/" \ "/SSSSSSSS///////SSSSSS/////SSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSS/" \ "/SXSSSSSS///////SSSSSS/////SSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSS/" \ "//////SSS///////SSSSSS/////SSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSS/" \ "/SSSSSSSS///////SSSSSS/////SSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSS/" \ "/SSSSSSSS///////SSSSSSSSSSSSSSSS///SSSSS//SSSSS////SSSSSSSS/" \ "/SSSSSS//SSSSSSSSSSSSSSSXSSSSSSSSXSSSSSSSXSSSSSSXSSSXSSSSSS/" \ "////////////////////////////////////////////////////////////"
def Load(self): self.fl_rs_gen = FileResourcesGenerator.FileResourcesGenerator() #self.fl_rs_gen.loadAndMakePathResources() self.fl_rs_gen.loadJsonPathFiles() self.dt_cl_man = DataCleanerManager.DataCleanerManager( self.fl_rs_gen.getDictionary_CM_Path()) self.dt_cl_man.cleanDataSet() self.coll_man = CollisionManager.CollisionManager() self.coll_man.LoadPathData(self.fl_rs_gen.getDictionary_CM_Path()) self.coll_man.getCollisionDictionary() self.coll_man.getCollisionInvDictionary() self.coll_man.getCollisionSimDictionary() self.first_it_aggregator = FirstIterationAggregator.FirstIterationFileAggregator( self.fl_rs_gen.getDictionary_LK_Path()) self.first_it_aggregator.RunInteration() #self.first_it_aggregator.LoadPath() self.first_it_aggregator_attr = FirstIterationAggregator.FirstIterationAttrAggregator( self.first_it_aggregator.getDictionary_LK_Path(), self.coll_man.getCollisionInvDictionary(), self.coll_man.getCollisionSimDictionary()) self.first_it_aggregator_attr.RunInterationCleaning() self.second_it_aggregator = SecondIterationAggregator.SecondIterationFileAggregator( self.first_it_aggregator.getDictionary_LK_Path()) self.second_it_aggregator.RunInteration() #self.second_it_aggregator.LoadPath() self.second_it_aggregator_attr = SecondIterationAggregator.SecondIterationAttrAggregator( self.second_it_aggregator.getDictionary_LK_Path(), self.coll_man.getCollisionInvDictionary(), self.coll_man.getCollisionSimDictionary()) self.second_it_aggregator_attr.RunInterationCleaning() self.third_it_aggregator = ThirdIterationAggregator.ThirdIterationFileAggregator( self.second_it_aggregator.getDictionary_LK_Path()) self.third_it_aggregator.RunInteration()