Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /* In the properties of an object in the Tiled editor, you can use Aliases#userData.
- * for example:
- * userData: some string
- * or like this:
- * userData: 1
- *
- * If you create the map programmatically you can set any Objects like e.g. a Sprite as user data of course. */
- // Then the user data will be where you put it in.
- Body body = parser.getBodies().get("some body");
- Object userData = body.getUserData();
- // The same works for fixtures and joints.
- Fixture fixture = parser.getFixtures().get("some fixture");
- Object userData = fixture.getUserData()
- Joint joint = parser.getJoints().get("some joint");
- Object userData = joint.getUserData();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement