Increased physics precision & cleanup.
This commit is contained in:
parent
010d19b414
commit
814f9c9788
@ -79,14 +79,14 @@ public class LevelFactory {
|
|||||||
|
|
||||||
Entity borderLeft = new Entity();
|
Entity borderLeft = new Entity();
|
||||||
CPhysics borderLeftPhysics = new CPhysics().setMovable(false).setGravityApplied(false)
|
CPhysics borderLeftPhysics = new CPhysics().setMovable(false).setGravityApplied(false)
|
||||||
.setProcessCollisions(false).setSize(0.1f, 20);
|
.setProcessCollisions(false).setSize(1f, 20);
|
||||||
borderLeftPhysics.setPosition(-xClamp - borderLeftPhysics.getSize().x, 0);
|
borderLeftPhysics.setPosition(-xClamp - borderLeftPhysics.getSize().x / 2, 0);
|
||||||
borderLeft.add(borderLeftPhysics);
|
borderLeft.add(borderLeftPhysics);
|
||||||
AppUtil.engine.addEntity(borderLeft);
|
AppUtil.engine.addEntity(borderLeft);
|
||||||
Entity borderRight = new Entity();
|
Entity borderRight = new Entity();
|
||||||
CPhysics borderRightPhysics = new CPhysics().setMovable(false).setGravityApplied(false)
|
CPhysics borderRightPhysics = new CPhysics().setMovable(false).setGravityApplied(false)
|
||||||
.setProcessCollisions(false).setSize(0.1f, 20);
|
.setProcessCollisions(false).setSize(1f, 20);
|
||||||
borderRightPhysics.setPosition(xClamp + borderRightPhysics.getSize().x, 0);
|
borderRightPhysics.setPosition(xClamp + borderRightPhysics.getSize().x / 2, 0);
|
||||||
borderRight.add(borderRightPhysics);
|
borderRight.add(borderRightPhysics);
|
||||||
AppUtil.engine.addEntity(borderRight);
|
AppUtil.engine.addEntity(borderRight);
|
||||||
}
|
}
|
||||||
|
@ -13,7 +13,7 @@ import com.saltosion.gladiator.util.Log;
|
|||||||
|
|
||||||
public class PhysicsSystem extends EntitySystem {
|
public class PhysicsSystem extends EntitySystem {
|
||||||
|
|
||||||
private static final float MAX_VEL = 1.75f, COLLISION_PRECISION = 12f, UPDATES_PER_SECOND = 240f;
|
private static final float MAX_VEL = 1.75f, COLLISION_PRECISION = 12f, UPDATES_PER_SECOND = 300f;
|
||||||
|
|
||||||
private static final ComponentMapper<CPhysics> pm = ComponentMapper.getFor(CPhysics.class);
|
private static final ComponentMapper<CPhysics> pm = ComponentMapper.getFor(CPhysics.class);
|
||||||
private static final ComponentMapper<CCombat> cm = ComponentMapper.getFor(CCombat.class);
|
private static final ComponentMapper<CCombat> cm = ComponentMapper.getFor(CCombat.class);
|
||||||
|
@ -425,7 +425,6 @@ public class RenderingSystem extends EntitySystem {
|
|||||||
debugRenderer.dispose();
|
debugRenderer.dispose();
|
||||||
particleRenderer.dispose();
|
particleRenderer.dispose();
|
||||||
font.dispose();
|
font.dispose();
|
||||||
SpriteLoader.dispose();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private class TextObject {
|
private class TextObject {
|
||||||
|
Loading…
Reference in New Issue
Block a user