Example usage for com.badlogic.gdx.physics.box2d ContactListener beginContact

List of usage examples for com.badlogic.gdx.physics.box2d ContactListener beginContact

Introduction

In this page you can find the example usage for com.badlogic.gdx.physics.box2d ContactListener beginContact.

Prototype

public void beginContact(Contact contact);

Source Link

Document

Called when two fixtures begin to touch.

Usage

From source file:com.stercore.code.net.dermetfan.utils.libgdx.box2d.ContactMultiplexer.java

License:Apache License

@Override
public void beginContact(Contact contact) {
    for (ContactListener listener : receivers)
        listener.beginContact(contact);
}

From source file:org.gmxteam.funkydomino.physics.box2d.ContactManager.java

License:Open Source License

/**
 *
 * @param cntct//from ww  w  . j  ava 2  s  .c o m
 */
public void beginContact(Contact cntct) {

    /*Debug.v("Contact entre le body " + cntct.getFixtureA().getBody()
     + " et " + cntct.getFixtureB().getBody());
     */
    final ContactListener cl = mBodies.get(cntct.getFixtureA().getBody());

    if (cl != null) {
        cl.beginContact(cntct);
    }

}