# exhaust_particle name = 'none' import random from math import * from miscmath import * from baseairobj import * image = None #COLOR = [226,178,54] COLOR = [249,229,9] LIFETIME = 50 def load_game_resources(): global image image = pygame.Surface((1,1)).convert() image.fill(COLOR) class exhaust_particle(AirObj): def __init__(self,x,y,dx,dy): global name,image AirObj.__init__(self,name,image) self.timer = LIFETIME self.x = x self.y = y self.dx = dx self.dy = dy #print "initializing exhaust particle" def collide(self,rect): pass def tick(self, speedadjust): self.timer -= 1 if self.timer < 0: self.dead = 1 self.x += self.dx self.y += self.dy self.rect.topleft = [self.x,self.y] #print "exhaust: x: %d y: %d dx: %f dy: %f" % (self.x,self.y,self.dx,self.dy)