예제 #1
0
파일: tank.py 프로젝트: RexRascerX/TankGame
  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
예제 #2
0
 def primaryRender(self, x, y, a):
     return imaging.rImage(x, y, a,
                           imaging.rRect(self.length, self.width, 0xff00ff))
예제 #3
0
 def render(self):
     return imaging.rRect(self.length, self.width, 0xFFFFFF)
예제 #4
0
 def secondaryRender(self):
     return imaging.rRect(self.length, self.width, 0xFFFFFF)