Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Body.java #13

Open
wants to merge 1 commit into
base: GLES2-AnchorCenter
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 16 additions & 2 deletions src/com/badlogic/gdx/physics/box2d/Body.java
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,10 @@ public class Body {

/** user data **/
private Object userData;


/** Assigns Sprite to body for look up **/
private Sprite attachedsprite;

/**
* Constructs a new body with the given address
* @param world the world
Expand All @@ -53,7 +56,18 @@ protected Body (World world, long addr) {
this.world = world;
this.addr = addr;
}


/** Assigns Sprite to body for look up **/
public void setAttachedSprite(Sprite Sprite )
{
attachedsprite = Sprite;
}

/** gets the Sprite in order to be used for the physics look up **/
public Sprite getAttachedSprite()
{
return attachedsprite;
}
/**
* Creates a fixture and attach it to this body. Use this function if you need to set some fixture parameters, like friction.
* Otherwise you can create the fixture directly from a shape. If the density is non-zero, this function automatically updates
Expand Down