# explosion 1 (air explosion) name = 'explosion1' type = 'gif' from baseexplosionobj import * images = [] def load_game_resources(): global images for loop in range(0,6): images.append(gfx.load('%s%d0.%s'%(name,loop,type))) class AirExplosion(ExplosionObj): def __init__(self,x,y,dx,dy): """create a new explosion with initial values- this explosion always occurs in the air""" global name,images ExplosionObj.__init__(self,name,images,x,y,dx,dy) self.groundheight = game.groundarena.bottom - self.rect.height + 1 self.y = y - self.rect.height/2 if self.y > self.groundheight: self.y = self.groundheight self.rect.topleft = [self.x,self.y]