def drawPlayer(self, line, position, tm=True): _color = self.teamColor if tm else self.enemyColor # it's not necessary, the view transformation won't modify the w element if not position.w > 0.001: return _x = position.x / position.w * self.scale _y = self._getYCoord(position)#position.z / position.w * self.scale _x += self.centerX _y += self.centerY if _x > (self.centerX+self.boundaryX): _x = self.centerX+self.boundaryX elif _x < (self.centerX-self.boundaryX): _x = self.centerX-self.boundaryX if _y > (self.centerY+self.boundaryY): _y = self.centerY+self.boundaryY elif _y < (self.centerY-self.boundaryY): _y = self.centerY-self.boundaryY ehfgraphics.drawSpot55WithDot(line, _x, _y, _color)
def drawSelf(self, line): ehfgraphics.drawSpot55WithDot(line, self.centerX, self.centerY, self.selfColor)