public abstract class Box2DSystem<T extends Entity> extends GameSystem<T>
Systementities, isDebugging| Constructor and Description |
|---|
Box2DSystem(com.badlogic.gdx.physics.box2d.World world,
int velocityIterations,
int positionIterations)
Constructor
|
| Modifier and Type | Method and Description |
|---|---|
com.badlogic.gdx.physics.box2d.World |
getWorld() |
void |
interpolate(Entity entity,
GameContainer gc,
float alpha) |
void |
interpolate(GameContainer gc,
float alpha)
Interpolate the
System |
void |
removeEntity(T entity)
|
abstract void |
render(Entity entity,
com.badlogic.gdx.physics.box2d.Body body,
float renderX,
float renderY,
GameContainer gc,
Graphics g)
Render a Box2D
Body associated with an Entity |
void |
render(Entity entity,
GameContainer gc,
Graphics g) |
void |
render(GameContainer gc,
Graphics g)
Render the
System |
void |
update(Entity entity,
GameContainer gc,
float delta) |
void |
update(GameContainer gc,
float delta)
Update the
System |
initialise, updateaddEntity, getEntity, isDebugging, setDebuggingpublic Box2DSystem(com.badlogic.gdx.physics.box2d.World world,
int velocityIterations,
int positionIterations)
world - The Box2D World instancevelocityIterations - positionIterations - public void update(GameContainer gc, float delta)
GameSystemSystemupdate in class GameSystem<T extends Entity>gc - The GameContainer calling updatedelta - The time in seconds since the last updatepublic void interpolate(GameContainer gc, float alpha)
GameSystemSysteminterpolate in class GameSystem<T extends Entity>gc - The GameContainer calling interpolatealpha - The alpha value to use during interpolationpublic void render(GameContainer gc, Graphics g)
GameSystemSystemrender in class GameSystem<T extends Entity>gc - The GameContainer calling renderg - The Graphics instancepublic void update(Entity entity, GameContainer gc, float delta)
public void interpolate(Entity entity, GameContainer gc, float alpha)
public void render(Entity entity, GameContainer gc, Graphics g)
public abstract void render(Entity entity, com.badlogic.gdx.physics.box2d.Body body, float renderX, float renderY, GameContainer gc, Graphics g)
Body associated with an Entityentity - The Entity the Body belongs tobody - The Body to be renderedrenderX - The x coordinate to render atrenderY - The y coordinate to render atgc - The GameContainer calling renderg - The current Graphics contextpublic void removeEntity(T entity)
SystemremoveEntity in class System<T extends Entity>entity - The Entity to be removedpublic com.badlogic.gdx.physics.box2d.World getWorld()