com.badlogic.gdx.physics.box2d.ContactListener Java Examples

The following examples show how to use com.badlogic.gdx.physics.box2d.ContactListener. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: PhysicsWorld.java    From tilt-game-android with MIT License 4 votes vote down vote up
public void setContactListener(final ContactListener pListener) {
	this.mWorld.setContactListener(pListener);
}
 
Example #2
Source File: ContactListenerMultiplexer.java    From ninja-rabbit with GNU General Public License v2.0 4 votes vote down vote up
public ContactListenerMultiplexer(final ContactListener... receivers) {
	super(receivers);
}
 
Example #3
Source File: ContactListenerMultiplexer.java    From ninja-rabbit with GNU General Public License v2.0 4 votes vote down vote up
public ContactListenerMultiplexer(final Array<ContactListener> receivers) {
	super(receivers);
}
 
Example #4
Source File: ContactListenerMultiplexer.java    From ninja-rabbit with GNU General Public License v2.0 4 votes vote down vote up
@Override
public void beginContact(final Contact contact) {
	for (ContactListener listener : receivers) {
		listener.beginContact(contact);
	}
}
 
Example #5
Source File: ContactListenerMultiplexer.java    From ninja-rabbit with GNU General Public License v2.0 4 votes vote down vote up
@Override
public void preSolve(final Contact contact, final Manifold oldManifold) {
	for (ContactListener listener : receivers) {
		listener.preSolve(contact, oldManifold);
	}
}
 
Example #6
Source File: ContactListenerMultiplexer.java    From ninja-rabbit with GNU General Public License v2.0 4 votes vote down vote up
@Override
public void postSolve(final Contact contact, final ContactImpulse impulse) {
	for (ContactListener listener : receivers) {
		listener.postSolve(contact, impulse);
	}
}
 
Example #7
Source File: ContactListenerMultiplexer.java    From ninja-rabbit with GNU General Public License v2.0 4 votes vote down vote up
@Override
public void endContact(final Contact contact) {
	for (ContactListener listener : receivers) {
		listener.endContact(contact);
	}
}