def __init__(self): Sprite.__init__(self) speed = settings.ball_speed direction = Vector.random() x, y = abs(direction) if y > x: direction = direction.orthogonal self.shape = settings.ball_shape self.velocity = speed * direction
def __init__(self): Sprite.__init__(self) self.shape = settings.paddle_shape.copy() self.velocity = 0 self.score = 0 self.target = Vector(0, 0)