public abstract class Box2DSystem extends UUIDSystem
System
entities, 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(UUIDEntity entity,
GameContainer gc,
float alpha)
Interpolate an
UUIDEntity |
void |
removeEntity(UUIDEntity entity)
|
abstract void |
render(UUIDEntity entity,
com.badlogic.gdx.physics.box2d.Body body,
float renderX,
float renderY,
GameContainer gc,
Graphics g)
Render a Box2D
Body associated with an UUIDEntity |
void |
render(UUIDEntity entity,
GameContainer gc,
Graphics g)
Render an
UUIDEntity and any debugging information if debugging is
enabled |
void |
update(GameContainer gc,
float delta)
Update the
System |
void |
update(UUIDEntity entity,
GameContainer gc,
float delta)
Update an
UUIDEntity |
addEntity, interpolate, isDebugging, render, setDebugging
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
initialise
public 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)
System
System
update
in interface System<UUIDEntity>
update
in class UUIDSystem
gc
- The GameContainer
calling updatedelta
- The time in seconds since the last updatepublic void update(UUIDEntity entity, GameContainer gc, float delta)
UUIDSystem
UUIDEntity
update
in class UUIDSystem
entity
- The UUIDEntity
to be updatedgc
- The GameContainer
calling updatedelta
- The time in seconds since the last updatepublic void interpolate(UUIDEntity entity, GameContainer gc, float alpha)
UUIDSystem
UUIDEntity
interpolate
in class UUIDSystem
entity
- The UUIDEntity
to be interpolatedgc
- The GameContainer
calling interpolatealpha
- The alpha value to use during interpolationpublic void render(UUIDEntity entity, GameContainer gc, Graphics g)
UUIDSystem
UUIDEntity
and any debugging information if debugging is
enabledrender
in class UUIDSystem
entity
- The UUIDEntity
to rendergc
- The GameContainer
calling renderg
- The Graphics
contextpublic abstract void render(UUIDEntity entity, com.badlogic.gdx.physics.box2d.Body body, float renderX, float renderY, GameContainer gc, Graphics g)
Body
associated with an UUIDEntity
entity
- The UUIDEntity
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(UUIDEntity entity)
System
removeEntity
in interface System<UUIDEntity>
removeEntity
in class UUIDSystem
entity
- The UUIDEntity
to be removedpublic com.badlogic.gdx.physics.box2d.World getWorld()
Copyright © 2014. All rights reserved.