Home > other >  Python plane war
Python plane war

Time:04-08

Hit_midenemy=pygame. Sprite. Groupcollide (self. Hero. Bullets, the self. The midenemy_group, True, False)
For j in self midenemy_group:
If hit_midenemy:

J. nermy -=1
If j. nermy==0:

J.k. ill ()
Score +=1000
This is the bullet code of medium-sized enemy planes flying in and out, I give blood of the enemy planes increased, each hit a little less blood, but there is a problem, when my plane fired bullets hit an enemy aircraft,
But the same kind of enemy planes on the screen also follow away blood, I can't solve this problem, strives for the big help,
  • Related