Game Development Reference
In-Depth Information
The whole code and art can be found in code bundle section of this chapter.
We have already created the
MyContactListener.java
and
MyMotionState.java
files in our
com.packtpub.libgdx.collisiontest
package. The following is a list
of Java files we will be creating:
•
MyBulletInterface.java
: This is a custom Bullet interface.
•
BulletWorld.java
: This is the class that contains the dynamics world. This
class implements
MyBulletInterface
.
•
BulletObjects.java
: This class inherits
BulletWorld
. It will have functions
to create a box, a cone, the ground body, and so on.
•
MyCollisionWorld.java
: This simple class inherits
BulletObjects
.
•
Items.java
: This is an
enum
object that has the basic shapes.
•
UserData.java
: As the name indicates, this stores the specific data related to
each rigid body.