Increased physics precision & cleanup.

This commit is contained in:
Jeasonfire 2015-05-18 01:05:47 +03:00
parent 010d19b414
commit 814f9c9788
3 changed files with 5 additions and 6 deletions

View File

@ -79,14 +79,14 @@ public class LevelFactory {
Entity borderLeft = new Entity();
CPhysics borderLeftPhysics = new CPhysics().setMovable(false).setGravityApplied(false)
.setProcessCollisions(false).setSize(0.1f, 20);
borderLeftPhysics.setPosition(-xClamp - borderLeftPhysics.getSize().x, 0);
.setProcessCollisions(false).setSize(1f, 20);
borderLeftPhysics.setPosition(-xClamp - borderLeftPhysics.getSize().x / 2, 0);
borderLeft.add(borderLeftPhysics);
AppUtil.engine.addEntity(borderLeft);
Entity borderRight = new Entity();
CPhysics borderRightPhysics = new CPhysics().setMovable(false).setGravityApplied(false)
.setProcessCollisions(false).setSize(0.1f, 20);
borderRightPhysics.setPosition(xClamp + borderRightPhysics.getSize().x, 0);
.setProcessCollisions(false).setSize(1f, 20);
borderRightPhysics.setPosition(xClamp + borderRightPhysics.getSize().x / 2, 0);
borderRight.add(borderRightPhysics);
AppUtil.engine.addEntity(borderRight);
}

View File

@ -13,7 +13,7 @@ import com.saltosion.gladiator.util.Log;
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<CCombat> cm = ComponentMapper.getFor(CCombat.class);

View File

@ -425,7 +425,6 @@ public class RenderingSystem extends EntitySystem {
debugRenderer.dispose();
particleRenderer.dispose();
font.dispose();
SpriteLoader.dispose();
}
private class TextObject {