Skip to content
Snippets Groups Projects
Commit 3903e3eb authored by timeo's avatar timeo
Browse files

fix les assets

parent 27634a76
No related branches found
No related tags found
No related merge requests found
package etat;
import static handlers.B2DVars.PPM;
import com.badlogic.gdx.Application;
import com.badlogic.gdx.Gdx;
import com.badlogic.gdx.files.FileHandle;
import com.badlogic.gdx.graphics.GL20;
......@@ -15,6 +17,7 @@ import com.badlogic.gdx.physics.box2d.FixtureDef;
import com.badlogic.gdx.physics.box2d.PolygonShape;
import com.badlogic.gdx.physics.box2d.World;
import com.badlogic.gdx.utils.Array;
import com.badlogic.gdx.utils.GdxRuntimeException;
import com.mygdx.game.PlatVenture;
import body.Joyau;
......@@ -172,7 +175,7 @@ public class Play extends GameState {
batch.draw(res.getTexture("idle_001"), player.getPosition().x - 5f/PPM, player.getPosition().y - 2f/PPM, 1/10f, 1/10f);
batch.end();
//dessine le monde box2d
// b2dr.render(world, b2dCam.combined);
b2dr.render(world, b2dCam.combined);
}
@Override
......@@ -297,7 +300,11 @@ public class Play extends GameState {
}
private void loadLevel(int current){
String path = "assets/level_00" + current + ".txt";
String path = "level_00" + current + ".txt";
if (Gdx.app.getType() == Application.ApplicationType.Android) {
path = "assets/level_00" + current + ".txt";
}
createWorld(path);
}
......@@ -366,21 +373,22 @@ public class Play extends GameState {
}
private void loadTexture(){
res.loadTexture("assets/Platform_J.png", "platJ");
res.loadTexture("assets/Platform_K.png", "platK");
res.loadTexture("assets/Platform_L.png", "platL");
res.loadTexture("assets/Brick_A.png", "brickA");
res.loadTexture("assets/Brick_B.png", "brickB");
res.loadTexture("assets/Brick_C.png", "brickC");
res.loadTexture("assets/Brick_D.png", "brickD");
res.loadTexture("assets/Brick_E.png", "brickE");
res.loadTexture("assets/Brick_F.png", "brickF");
res.loadTexture("assets/Brick_G.png", "brickG");
res.loadTexture("assets/Brick_H.png", "brickH");
res.loadTexture("assets/Brick_I.png", "brickI");
res.loadTexture("assets/Exit_Z.png", "exit");
res.loadTexture("assets/Back.png", "back");
res.loadTexture("assets/Idle__000.png", "idle_001");
res.loadTexture("badlogic.jpg", "plat");
res.loadTexture("Platform_J.png", "platJ");
res.loadTexture("Platform_K.png", "platK");
res.loadTexture("Platform_L.png", "platL");
res.loadTexture("Brick_A.png", "brickA");
res.loadTexture("Brick_B.png", "brickB");
res.loadTexture("Brick_C.png", "brickC");
res.loadTexture("Brick_D.png", "brickD");
res.loadTexture("Brick_E.png", "brickE");
res.loadTexture("Brick_F.png", "brickF");
res.loadTexture("Brick_G.png", "brickG");
res.loadTexture("Brick_H.png", "brickH");
res.loadTexture("Brick_I.png", "brickI");
res.loadTexture("Exit_Z.png", "exit");
res.loadTexture("Back.png", "back");
res.loadTexture("Idle__000.png", "idle_001");
//res.getTexture("platJ");
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment