def render(self, draw: DrawingTool): self.drive.render(draw) if self.target_direction is not None: draw.color(draw.lime) draw.triangle(self.target - self.target_direction * 250, self.target_direction)
def render(self, draw: DrawingTool): draw.color(draw.cyan) draw.square(self.target_pos, 50) target_direction = direction(self.car.position, self.target_pos) draw.triangle(self.car.position + target_direction * 200, target_direction, up=self.car.up())
def render(self, draw: DrawingTool): self.arrive.render(draw) draw.color(draw.lime) draw.circle(self.intercept.ground_pos, Ball.radius) draw.point(self.intercept.ball.position) if self.target: strike_direction = ground_direction(self.intercept.ground_pos, self.target) draw.color(draw.cyan) draw.triangle(self.intercept.ground_pos + strike_direction * 150, strike_direction, length=100) if not self._has_drawn_prediction: self._has_drawn_prediction = True draw.ball_prediction(self.info.ball_predictions, self.intercept.time)
def render(self, draw: DrawingTool): draw.color(draw.pink) draw.triangle(self.car.position + self._shift_direction * 50, self._shift_direction)