Esempio n. 1
0
 def __init__(self, element=None, comp=None, nescient=None, hexparams=get_hex_params(35)):
     if nescient != None:
         Nescient.__init__(self, nescient.element, nescient.comp, nescient.name,
                         nescient.weapon, nescient.location, nescient.facing, nescient.body)
     else:
         if element == None:
             element = rand_element()
         if comp == None:
             comp = rand_comp(suit=element, kind='Nescient')
         Nescient.__init__(self, comp=comp, element=element)
     
     pygame.sprite.Sprite.__init__(self)
     self.hexparams  = hexparams
     self.image = pygame.Surface((577, 560))
     self.hex = make_hex(self.hexparams, COLORS[self.element])
     self.body = None
     
     self.images = {'head':None, 'left':None, 'right':None, 'tail':None}
     self.rects  = {'head':None, 'left':None, 'right':None, 'tail':None}
     
     for part in self.images:
         #self.images[part] = make_hex(self.hexparams, COLORS[self.element], self.image)
         #self.rects[part]  = self.images[part].get_rect()
         self.rects[part]  = pygame.rect.Rect((0,0), self.hexparams[-1])
     self.rect = self.image.get_rect()
     self.image.set_colorkey(black)
     self.text = []