Skip to content
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