def __init__(self, size, x=0, y=0, vx=0, vy=0, ax=0, ay=0): """Build the component.""" AABB.__init__(self, x, y, size) self.velocity = Vector(vx, vy) self.acceleration = Vector(ax, ay) self.acceleration += _world.gravity self.contact = False
def __init__(self): """Set config values for world AABB.""" AABB.__init__(self, config['offset'][0], config['offset'][1], config['size']) self.gravity = Vector(*config['gravity'])