Added wall.
This commit is contained in:
parent
9c3643682d
commit
fed3680c18
Binary file not shown.
Before Width: | Height: | Size: 901 KiB |
Binary file not shown.
Before Width: | Height: | Size: 6.0 KiB After Width: | Height: | Size: 33 KiB |
@ -17,7 +17,6 @@ public class TestLevel implements Level {
|
||||
public void generate() {
|
||||
// Audience
|
||||
Entity audience = new Entity();
|
||||
|
||||
Sprite audienceSprite0 = SpriteLoader.loadSprite(Name.AUDIENCEIMG, 0, 0, 768, 576);
|
||||
Sprite audienceSprite1 = SpriteLoader.loadSprite(Name.AUDIENCEIMG, 1, 0, 768, 576);
|
||||
CRenderedObject audienceRO = new CRenderedObject();
|
||||
@ -26,10 +25,19 @@ public class TestLevel implements Level {
|
||||
audienceRO.playAnimation("Default-Animation");
|
||||
audience.add(audienceRO);
|
||||
CPhysics audiencePO = new CPhysics().setMovable(false).setGravityApplied(false)
|
||||
.setProcessCollisions(false).setPosition(0, 10).setZParallax(9);
|
||||
.setProcessCollisions(false).setGhost(true).setPosition(0, 10).setZParallax(9);
|
||||
audience.add(audiencePO);
|
||||
AppUtil.engine.addEntity(audience);
|
||||
|
||||
// Wall
|
||||
Entity wall = new Entity();
|
||||
CRenderedObject wallRO = new CRenderedObject(SpriteLoader.loadSprite(Name.WALLIMG));
|
||||
wall.add(wallRO);
|
||||
CPhysics wallPO = new CPhysics().setMovable(false).setGravityApplied(false)
|
||||
.setProcessCollisions(false).setGhost(true).setPosition(0, 2).setZParallax(1.5f);
|
||||
wall.add(wallPO);
|
||||
AppUtil.engine.addEntity(wall);
|
||||
|
||||
// Ground
|
||||
Entity ground = new Entity();
|
||||
Sprite groundSprite = SpriteLoader.loadSprite(Name.GROUNDIMG);
|
||||
|
@ -12,7 +12,7 @@ import com.saltosion.gladiator.util.Direction;
|
||||
|
||||
public class PhysicsSystem extends EntitySystem {
|
||||
|
||||
private static final float MAX_VEL = 1.75f, COLLISION_PRECISION = 12f, UPDATES_PER_SECOND = 120f;
|
||||
private static final float MAX_VEL = 1.75f, COLLISION_PRECISION = 12f, UPDATES_PER_SECOND = 240f;
|
||||
|
||||
private static final ComponentMapper<CPhysics> pm = ComponentMapper.getFor(CPhysics.class);
|
||||
private static final ComponentMapper<CCombat> cm = ComponentMapper.getFor(CCombat.class);
|
||||
|
Loading…
Reference in New Issue
Block a user