Box2DMapObjectParser |
Parses MapObjects from a Map and generates Box2D Bodies , Fixtures and Joints from them.
Just create a new Box2DMapObjectParser and call Box2DMapObjectParser.load(World, MapLayer) to load all compatible objects (defined by the the Box2DMapObjectParser.aliases ) into your World .
If you only want specific Fixtures or Bodies, you can use the Box2DMapObjectParser.createBody(World, MapObject) and Box2DMapObjectParser.createFixture(MapObject) methods.
How you define compatible objects in the TiledMap editor:
In your object layer, right-click an object and set its properties to those of the Body/Fixture/both (in case you're creating an object ) you'd like, as defined in the used Box2DMapObjectParser.Aliases object.
For type, you have to choose Box2DMapObjectParser.Aliases.body , Box2DMapObjectParser.Aliases.fixture or Box2DMapObjectParser.Aliases.object .
To add Fixtures to a Body, add a Box2DMapObjectParser.Aliases.body property with the same value to each Fixture of a Body.
To create Joints , add any object to the layer and just put everything needed in its properties.
|
Box2DMapObjectParser.Aliases |
defines the Box2DMapObjectParser.aliases to use when parsing
|
Box2DMapObjectParser.Listener.Adapter |
Does nothing.
|
Box2DUtils |
provides methods for operations with Box2D Bodies , Fixtures and Shapes
|
Box2DUtils.Settings |
b2Settings.h
|
Box2DUtils.ShapeCache |
cached method results
|
Breakable |
Breaks bodies or fixtures if they get hit too hard.
|
Breakable.Callback.Adapter |
|
Breakable.Manager |
Manages the Breakables of the Contacts it receives.
|
Chain |
Holds Chain.segments and Chain.connections to simulate a chain.
|
Chain.Connection |
holds one or more joints
|
Chain.CopyBuilder |
|
Chain.DefBuilder |
a Chain.Builder that builds using a BodyDef , FixtureDef and Joint
|
Chain.DefShapeBuilder |
|
Chain.JointDefCopyBuilder |
|
ContactAdapter |
Override this if you only want to use a subset of methods of the ContactListener .
|
ContactMultiplexer |
a ContactListener that sends Contacts to an Array of ContactListeners
|
MouseJointAdapter |
an InputAdapter managing a MouseJoint
|
MouseJointAdapter.Listener.Adapter |
Does nothing and returns false.
|
PositionController |
moves a body to a position using forces
|
PositionController.D |
the derivative control loop component
|
PositionController.P |
the proportional control loop component
|
PositionController.PD |
a proportional-derivative controller
|
RotationController |
rotates a body to an angle using torque
|
RotationController.D |
the derivative control loop component
|
RotationController.P |
the proportional control loop component
|
RotationController.PD |
a proportional-derivative controller
|
WorldObserver |
|
WorldObserver.BodyChange |
the changes of a Body
|
WorldObserver.DistanceJointChange |
the changes of a DistanceJoint
|
WorldObserver.FixtureChange |
the changes of a Fixture
|
WorldObserver.FrictionJointChange |
the changes of a FrictionJoint
|
WorldObserver.GearJointChange |
the changes of a GearJoint
|
WorldObserver.JointChange<T extends com.badlogic.gdx.physics.box2d.Joint> |
the changes of a Joint
|
WorldObserver.Listener.Adapter |
A class that implements Listener.
|
WorldObserver.MotorJointChange |
the changes of a MotorJoint
|
WorldObserver.MouseJointChange |
the changes of a MouseJoint
|
WorldObserver.PrismaticJointChange |
the changes of a PrismaticJoint
|
WorldObserver.RevoluteJointChange |
the changes of a RevoluteJoint
|
WorldObserver.RopeJointChange |
the changes of a RopeJoint
|
WorldObserver.UnexpectedListener |
A Listener that calls another Listener on unpredictable/unexpected events.
|
WorldObserver.WeldJointChange |
the changes of a WeldJoint
|
WorldObserver.WheelJointChange |
the changes of a WheelJoint
|
WorldObserver.WorldChange |
the changes of a World
|