def __init__(self, position, depth): self.position = position """ if depth == 0: image_name = "star0.png" elif depth == 1: image_name = "star1.png" else: image_name = "star2.png" """ image_name = "star2.png" self.image = image.get_image(image_name)
def __init__(self, physics_space=None, view=None, position=(0,0), speed=SPEED, direction=0): self.physics_space = physics_space self.view = view self.image = image.get_image("shot.png") self.body = phys.make_box( physics_space, dim=(DIAMETER, DIAMETER), position=position, rotation=math.radians(direction), friction=0) initial_impulse = phys.make_impulse( direction, speed) # TODO: make speed actually represent speed phys.apply_impulse( self.body, initial_impulse)
def __init__(self, physics_space=None, view=None, position=(0, 0), speed=SPEED, direction=0): self.physics_space = physics_space self.view = view self.image = image.get_image("shot.png") self.body = phys.make_box(physics_space, dim=(DIAMETER, DIAMETER), position=position, rotation=math.radians(direction), friction=0) initial_impulse = phys.make_impulse( direction, speed) # TODO: make speed actually represent speed phys.apply_impulse(self.body, initial_impulse)
def __init__(self, arena, plan, position): Part.__init__(self, arena, plan, position) self.image = get_image("cockpit.png")
def __init__(self, arena, plan, position): Part.__init__(self, arena, plan, position) self.image = get_image("blaster.png")