예제 #1
0
파일: blocks.py 프로젝트: mappy13/nihil-ace
 def draw(self):
     super(EngineBlock, self).draw()
     if self._active and not off_screen(self._body.position):
         offset = Vec2d(0, -BLOCK_SIZE)
         offset.rotate(self._body.angle + float(self.direction) / 2 * math.pi)
         points = [p + offset for p in self._shape.get_vertices()]
         draw_rect(ENGINE_FIRE.id, points, direction=self.direction)
예제 #2
0
파일: blocks.py 프로젝트: mappy13/nihil-ace
 def draw(self):
     if off_screen(self._body.position):
         return
     if self.damage >= self.health:
         tex = self.img_destroyed.id
     elif self.damage > 0:
         tex = self.img_damaged.id
     else:
         tex = self.img.id
     draw_rect(tex, self._shape.get_vertices(), direction=self.direction)
예제 #3
0
파일: blocks.py 프로젝트: mappy13/nihil-ace
 def draw(self):
     draw_rect(self.img.id, self._shape.get_vertices(),
               direction=self.direction)