Esempio n. 1
0
def collideBalls(b1, b2):
    """Check for collision between two balls"""
    if module_physicsEngine.collideTest(b1, b2): # If they have collided
        module_physicsEngine.ballBounce(b1, b2)
Esempio n. 2
0
def collideExit(ball):
    """Check for a ball exiting (colliding with exit)"""
    for e in exits:
        if module_physicsEngine.collideTest(ball, e):
            ball.exited = True