def render(self): if(self.dead): return [] length = self.chassis.length width = self.chassis.width + self.locomotion.width * 2 toren = [] toren.append(imaging.rImage(self.x,self.y,self.a,imaging.rRect(length,width,0x000000))) for x in range(self.locomotion.numRen()): toren[0].addrect((x%2)*(self.chassis.length-self.locomotion.length-4),(x//2)*(self.chassis.width+self.locomotion.width),0,self.locomotion.render()) toren[0].addrect(0,self.locomotion.width,0,self.chassis.render()) for x in self.secondaries: toren[0].addrect(length/2,width/2,0,x.secondaryRender()) for x in self.primaries: toren.append(x.primaryRender(self.x+length/2,self.y+width/2,self.primaryAs[x])) return toren
def primaryRender(self, x, y, a): return imaging.rImage(x, y, a, imaging.rRect(self.length, self.width, 0xff00ff))