Example #1
0
def generate_cat(space):
    cat = Body(mass=1, moment=1)
    cat_shape = Cat(cat, 15)
    cat_shape.elasticity = 1
    cat.position = (50, 120)
    cat_shape.collision_type = 1

    # Setup the collision callback function Cat and Pickle under boost
    g = space.add_collision_handler(1, 6)
    g.begin = same_elem_collision

    space.add(cat, cat_shape)