def draw(self, screen, zoom_factor, offset_pos=(0, 0)): draw_pos = (self.pos[0] - offset_pos[0], self.pos[1] - offset_pos[1]) draw(screen, self.sprite, draw_pos, self.angle, self.scale, zoom_factor) for s in self.satellites: s.draw(screen, zoom_factor, offset_pos) self.launcher.draw(screen, zoom_factor, offset_pos)
def draw(self, screen, zoom_factor, offset_pos=(0, 0)): draw_pos = (self.pos[0] - offset_pos[0], self.pos[1] - offset_pos[1]) if not self.exploded: if offset_pos == (0, 0): self.angle = -1 * get_angle_between( pygame.mouse.get_pos(), to_screen(scale_pos(self.pos, zoom_factor))) + 90 if self.thrusting and self.fuel > 0: draw(screen, self.sprite_thrusting, draw_pos, self.angle, self.scale, zoom_factor) else: draw(screen, self.sprite, draw_pos, self.angle, self.scale, zoom_factor)
def draw(self, screen, zoom_factor, offset_pos=(0, 0)): draw_pos = (self.pos[0] - offset_pos[0], self.pos[1] - offset_pos[1]) self.launch_angle = get_angle_between( pygame.mouse.get_pos(), to_screen(scale_pos(self.pos, zoom_factor))) if self.empty: draw(screen, self.sprite_pad, draw_pos, self.angle - 90, self.scale, zoom_factor) else: draw(screen, self.sprite_pad, draw_pos, self.angle - 90, self.scale, zoom_factor) draw(screen, self.sprite_rocket, draw_pos, -1 * self.launch_angle + 90, self.scale, zoom_factor)
def draw(self, screen, zoom_factor, offset_pos=(0, 0)): draw_pos = (self.pos[0] - offset_pos[0], self.pos[1] - offset_pos[1]) self.draw_orbit(screen, zoom_factor, offset_pos) draw(screen, self.sprite, draw_pos, self.angle, self.scale, zoom_factor)
def draw(self, screen, zoom_factor): if not self.done: draw(screen, self.draw_sprite, self.pos, 0, self.scale, zoom_factor)