示例#1
0
 def enemyLoad(self):
     for enemy in Et.R_sg.enemy_list:
         temp = It.EnemyInfo()
         temp.site = enemy["site"]
         Et.Em_info.append(
             temp
         )
         tempe = It.Enemy(temp,self)
         tempe.origin_site = enemy["site"]
         self.enemy_list.append(
             tempe
         )
示例#2
0
 def load_from_json(self):
     with open (gametestjson,'r') as checkpointinfo:
         checkpoint1=json.load(checkpointinfo)
         for enemysite in checkpoint1[6]:
             self.enemy_list.append(Item.Enemy())
         for count in list(range(1,len(self.enemy_list)+1)):
             self.enemy_list[count].site=checkpoint1[6][count]
             self.enemy_list[count].size=checkpoint1[4]
         self.worldsize=checkpoint1[1]
         self.playerpic=pygame.image.load(checkpoint1[3]).convert()
         self.enemypic=pygame.image.load(checkpoint1[5]).convert()
         self.background=pygame.image.load(checkpoint1[0]).convert()
         self.single_player.size=checkpoint1[2]
         self.gameover=0