Jonathan Hager 6 years ago
parent 07d093265f
commit ea3ae11cec

@ -323,15 +323,40 @@ public class Controller extends ApplicationAdapter implements InputProcessor{
if(cs.touchDown(x,y) == -1){
}
else if(cs.touchDown(x,y) == 6){
cs.dispose();
else if (cs.touchDown(x,y) == 0){
currentChapter = 0;
cs = null;
ts = new Titlescreen(GAME_WORLD_WIDTH, GAME_WORLD_HEIGHT);
ls = new Levelscreen(level.get(currentChapter).size(), GAME_WORLD_WIDTH, GAME_WORLD_HEIGHT, camera.combined);
}
else if (cs.touchDown(x,y) == 1){
currentChapter = 1;
cs = null;
ls = new Levelscreen(level.get(currentChapter).size(), GAME_WORLD_WIDTH, GAME_WORLD_HEIGHT, camera.combined);
}
else if (cs.touchDown(x,y) == 2){
currentChapter = 2;
cs = null;
ls = new Levelscreen(level.get(currentChapter).size(), GAME_WORLD_WIDTH, GAME_WORLD_HEIGHT, camera.combined);
}
else if(cs.touchDown(x,y) == 5){
else if (cs.touchDown(x,y) == 3){
currentChapter = 3;
cs = null;
ls = new Levelscreen(level.get(currentChapter).size(), GAME_WORLD_WIDTH, GAME_WORLD_HEIGHT, camera.combined);
}
else if (cs.touchDown(x,y) == 4){
currentChapter = 4;
cs = null;
ls = new Levelscreen(level.get(currentChapter).size(), GAME_WORLD_WIDTH, GAME_WORLD_HEIGHT, camera.combined);
}
else if (cs.touchDown(x,y) == 5){
currentChapter = 5;
cs = null;
ls = new Levelscreen(level.get(currentChapter).size(), GAME_WORLD_WIDTH, GAME_WORLD_HEIGHT, camera.combined);
}
else if(cs.touchDown(x,y) == 6){
cs.dispose();
cs = null;
le = new Leveleditor(GAME_WORLD_WIDTH,GAME_WORLD_HEIGHT,camera.combined);
ts = new Titlescreen(GAME_WORLD_WIDTH, GAME_WORLD_HEIGHT);
}
else{
cs.dispose();

@ -52,12 +52,12 @@ public class Chapterscreen{
shapeRenderer.setProjectionMatrix(matrix);
buttons = new ArrayList<>();
buttons.add(new Button("Chapter 1", (int)(0.05 * GAME_WORLD_WIDTH - 0.5 * 3/80 * GAME_WORLD_WIDTH), (int)(0.7 * GAME_WORLD_HEIGHT), (int)((1f/3f) * 0.8 *GAME_WORLD_WIDTH), (int)(0.2 * GAME_WORLD_HEIGHT), 0));
buttons.add(new Button("Chapter 2", (int)((0.1 * GAME_WORLD_WIDTH + buttons.get(0).getWidth()) - 0.5 * 3/80 * GAME_WORLD_WIDTH), (int)(0.7 * GAME_WORLD_HEIGHT), (int)((1f/3f) * 0.8 *GAME_WORLD_WIDTH), (int)(0.2 * GAME_WORLD_HEIGHT), 1));
buttons.add(new Button("Chapter 3", (int)(0.15 * GAME_WORLD_WIDTH + buttons.get(0).getWidth()*2 - 0.5 * 3/80 * GAME_WORLD_WIDTH), (int)(0.7 * GAME_WORLD_HEIGHT), (int)((1f/3f) * 0.8 *GAME_WORLD_WIDTH), (int)(0.2 * GAME_WORLD_HEIGHT), 2));
buttons.add(new Button("Chapter 4", (int)(0.05 * GAME_WORLD_WIDTH - 0.5 * 3/80 * GAME_WORLD_WIDTH), (int)(0.3 * GAME_WORLD_HEIGHT), (int)((1f/3f) * 0.8 *GAME_WORLD_WIDTH), (int)(0.2 * GAME_WORLD_HEIGHT), 3));
buttons.add(new Button("Chapter 5", (int)(0.1 * GAME_WORLD_WIDTH + buttons.get(0).getWidth() - 0.5 * 3/80 * GAME_WORLD_WIDTH), (int)(0.3 * GAME_WORLD_HEIGHT), (int)((1f/3f) * 0.8 *GAME_WORLD_WIDTH), (int)(0.2 * GAME_WORLD_HEIGHT), 4));
buttons.add(new Button("User Level",(int)(0.15 * GAME_WORLD_WIDTH + buttons.get(0).getWidth()*2 - 0.5 * 3/80 * GAME_WORLD_WIDTH), (int)(0.3 * GAME_WORLD_HEIGHT), (int)((1f/3f) * 0.8 *GAME_WORLD_WIDTH), (int)(0.2 * GAME_WORLD_HEIGHT), 5));
buttons.add(new Button("Chapter 1", (int)(0.05 * GAME_WORLD_WIDTH - 0.5 * 3/80 * GAME_WORLD_WIDTH), (int)(0.7 * GAME_WORLD_HEIGHT), (int)((1f/3f) * 0.8 *GAME_WORLD_WIDTH), (int)(0.2 * GAME_WORLD_HEIGHT), 1));
buttons.add(new Button("Chapter 2", (int)((0.1 * GAME_WORLD_WIDTH + buttons.get(0).getWidth()) - 0.5 * 3/80 * GAME_WORLD_WIDTH), (int)(0.7 * GAME_WORLD_HEIGHT), (int)((1f/3f) * 0.8 *GAME_WORLD_WIDTH), (int)(0.2 * GAME_WORLD_HEIGHT), 2));
buttons.add(new Button("Chapter 3", (int)(0.15 * GAME_WORLD_WIDTH + buttons.get(0).getWidth()*2 - 0.5 * 3/80 * GAME_WORLD_WIDTH), (int)(0.7 * GAME_WORLD_HEIGHT), (int)((1f/3f) * 0.8 *GAME_WORLD_WIDTH), (int)(0.2 * GAME_WORLD_HEIGHT), 3));
buttons.add(new Button("Chapter 4", (int)(0.05 * GAME_WORLD_WIDTH - 0.5 * 3/80 * GAME_WORLD_WIDTH), (int)(0.3 * GAME_WORLD_HEIGHT), (int)((1f/3f) * 0.8 *GAME_WORLD_WIDTH), (int)(0.2 * GAME_WORLD_HEIGHT), 4));
buttons.add(new Button("Chapter 5", (int)(0.1 * GAME_WORLD_WIDTH + buttons.get(0).getWidth() - 0.5 * 3/80 * GAME_WORLD_WIDTH), (int)(0.3 * GAME_WORLD_HEIGHT), (int)((1f/3f) * 0.8 *GAME_WORLD_WIDTH), (int)(0.2 * GAME_WORLD_HEIGHT), 5));
buttons.add(new Button("User Level",(int)(0.15 * GAME_WORLD_WIDTH + buttons.get(0).getWidth()*2 - 0.5 * 3/80 * GAME_WORLD_WIDTH), (int)(0.3 * GAME_WORLD_HEIGHT), (int)((1f/3f) * 0.8 *GAME_WORLD_WIDTH), (int)(0.2 * GAME_WORLD_HEIGHT), 0));
buttons.add(new Button("back", (int)(0.05 * GAME_WORLD_WIDTH), (int)(0.02 * GAME_WORLD_HEIGHT), (int)(0.2 * GAME_WORLD_WIDTH), (int)(0.1 * GAME_WORLD_HEIGHT), 6));
FreeTypeFontGenerator generator = new FreeTypeFontGenerator(Gdx.files.internal("font.ttf"));

@ -1 +1 @@
{goal:{xPos:1000,yPos:200,sizeX:450,sizeY:100,thickness:0.2},projectile:{xPos:350,yPos:200,mass:5,radius:10},math:{},xPosPivot:200,yPosPivot:200,isTraceInitialised:[false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false],traces:[{x:-10,y:-10},{x:-10,y:-10},{x:-10,y:-10},{x:-10,y:-10},{x:-10,y:-10},{x:-10,y:-10},{x:-10,y:-10},{x:-10,y:-10},{x:-10,y:-10},{x:-10,y:-10},{x:-10,y:-10},{x:-10,y:-10},{x:-10,y:-10},{x:-10,y:-10},{x:-10,y:-10},{x:-10,y:-10},{x:-10,y:-10},{x:-10,y:-10},{x:-10,y:-10},{x:-10,y:-10},{x:-10,y:-10},{x:-10,y:-10},{x:-10,y:-10},{x:-10,y:-10},{x:-10,y:-10},{x:-10,y:-10},{x:-10,y:-10},{x:-10,y:-10},{x:-10,y:-10},{x:-10,y:-10},{x:-10,y:-10},{x:-10,y:-10},{x:-10,y:-10},{x:-10,y:-10},{x:-10,y:-10},{x:-10,y:-10},{x:-10,y:-10},{x:-10,y:-10},{x:-10,y:-10},{x:-10,y:-10},{x:-10,y:-10},{x:-10,y:-10},{x:-10,y:-10},{x:-10,y:-10},{x:-10,y:-10},{x:-10,y:-10},{x:-10,y:-10},{x:-10,y:-10},{x:-10,y:-10},{x:-10,y:-10}],objects:[]}
{goal:{xPos:1000,yPos:200,sizeX:450,sizeY:100,thickness:0.2},projectile:{xPos:350,yPos:200,mass:5,radius:10},math:{},xPosPivot:200,yPosPivot:200,isTraceInitialised:[false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false],traces:[{x:-10,y:-10},{x:-10,y:-10},{x:-10,y:-10},{x:-10,y:-10},{x:-10,y:-10},{x:-10,y:-10},{x:-10,y:-10},{x:-10,y:-10},{x:-10,y:-10},{x:-10,y:-10},{x:-10,y:-10},{x:-10,y:-10},{x:-10,y:-10},{x:-10,y:-10},{x:-10,y:-10},{x:-10,y:-10},{x:-10,y:-10},{x:-10,y:-10},{x:-10,y:-10},{x:-10,y:-10},{x:-10,y:-10},{x:-10,y:-10},{x:-10,y:-10},{x:-10,y:-10},{x:-10,y:-10},{x:-10,y:-10},{x:-10,y:-10},{x:-10,y:-10},{x:-10,y:-10},{x:-10,y:-10},{x:-10,y:-10},{x:-10,y:-10},{x:-10,y:-10},{x:-10,y:-10},{x:-10,y:-10},{x:-10,y:-10},{x:-10,y:-10},{x:-10,y:-10},{x:-10,y:-10},{x:-10,y:-10},{x:-10,y:-10},{x:-10,y:-10},{x:-10,y:-10},{x:-10,y:-10},{x:-10,y:-10},{x:-10,y:-10},{x:-10,y:-10},{x:-10,y:-10},{x:-10,y:-10},{x:-10,y:-10}],objects:[]}

@ -1 +1 @@
{goal:{xPos:1000,yPos:200,sizeX:450,sizeY:100,thickness:0.2},projectile:{xPos:350,yPos:200,mass:5,radius:10},math:{},xPosPivot:200,yPosPivot:200,isTraceInitialised:[false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false],traces:[{x:-10,y:-10},{x:-10,y:-10},{x:-10,y:-10},{x:-10,y:-10},{x:-10,y:-10},{x:-10,y:-10},{x:-10,y:-10},{x:-10,y:-10},{x:-10,y:-10},{x:-10,y:-10},{x:-10,y:-10},{x:-10,y:-10},{x:-10,y:-10},{x:-10,y:-10},{x:-10,y:-10},{x:-10,y:-10},{x:-10,y:-10},{x:-10,y:-10},{x:-10,y:-10},{x:-10,y:-10},{x:-10,y:-10},{x:-10,y:-10},{x:-10,y:-10},{x:-10,y:-10},{x:-10,y:-10},{x:-10,y:-10},{x:-10,y:-10},{x:-10,y:-10},{x:-10,y:-10},{x:-10,y:-10},{x:-10,y:-10},{x:-10,y:-10},{x:-10,y:-10},{x:-10,y:-10},{x:-10,y:-10},{x:-10,y:-10},{x:-10,y:-10},{x:-10,y:-10},{x:-10,y:-10},{x:-10,y:-10},{x:-10,y:-10},{x:-10,y:-10},{x:-10,y:-10},{x:-10,y:-10},{x:-10,y:-10},{x:-10,y:-10},{x:-10,y:-10},{x:-10,y:-10},{x:-10,y:-10},{x:-10,y:-10}],objects:[]}
{goal:{xPos:200,yPos:200,sizeX:450,sizeY:100,thickness:0.2},projectile:{xPos:350,yPos:200,mass:5,radius:10},math:{},xPosPivot:200,yPosPivot:200,isTraceInitialised:[false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false],traces:[{x:-10,y:-10},{x:-10,y:-10},{x:-10,y:-10},{x:-10,y:-10},{x:-10,y:-10},{x:-10,y:-10},{x:-10,y:-10},{x:-10,y:-10},{x:-10,y:-10},{x:-10,y:-10},{x:-10,y:-10},{x:-10,y:-10},{x:-10,y:-10},{x:-10,y:-10},{x:-10,y:-10},{x:-10,y:-10},{x:-10,y:-10},{x:-10,y:-10},{x:-10,y:-10},{x:-10,y:-10},{x:-10,y:-10},{x:-10,y:-10},{x:-10,y:-10},{x:-10,y:-10},{x:-10,y:-10},{x:-10,y:-10},{x:-10,y:-10},{x:-10,y:-10},{x:-10,y:-10},{x:-10,y:-10},{x:-10,y:-10},{x:-10,y:-10},{x:-10,y:-10},{x:-10,y:-10},{x:-10,y:-10},{x:-10,y:-10},{x:-10,y:-10},{x:-10,y:-10},{x:-10,y:-10},{x:-10,y:-10},{x:-10,y:-10},{x:-10,y:-10},{x:-10,y:-10},{x:-10,y:-10},{x:-10,y:-10},{x:-10,y:-10},{x:-10,y:-10},{x:-10,y:-10},{x:-10,y:-10},{x:-10,y:-10}],objects:[]}

@ -1 +1 @@
{goal:{xPos:700,yPos:200,sizeX:450,sizeY:100,thickness:0.2},projectile:{xPos:350,yPos:200,mass:5,radius:10},math:{},xPosPivot:200,yPosPivot:200,isTraceInitialised:[false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false],traces:[{x:-10,y:-10},{x:-10,y:-10},{x:-10,y:-10},{x:-10,y:-10},{x:-10,y:-10},{x:-10,y:-10},{x:-10,y:-10},{x:-10,y:-10},{x:-10,y:-10},{x:-10,y:-10},{x:-10,y:-10},{x:-10,y:-10},{x:-10,y:-10},{x:-10,y:-10},{x:-10,y:-10},{x:-10,y:-10},{x:-10,y:-10},{x:-10,y:-10},{x:-10,y:-10},{x:-10,y:-10},{x:-10,y:-10},{x:-10,y:-10},{x:-10,y:-10},{x:-10,y:-10},{x:-10,y:-10},{x:-10,y:-10},{x:-10,y:-10},{x:-10,y:-10},{x:-10,y:-10},{x:-10,y:-10},{x:-10,y:-10},{x:-10,y:-10},{x:-10,y:-10},{x:-10,y:-10},{x:-10,y:-10},{x:-10,y:-10},{x:-10,y:-10},{x:-10,y:-10},{x:-10,y:-10},{x:-10,y:-10},{x:-10,y:-10},{x:-10,y:-10},{x:-10,y:-10},{x:-10,y:-10},{x:-10,y:-10},{x:-10,y:-10},{x:-10,y:-10},{x:-10,y:-10},{x:-10,y:-10},{x:-10,y:-10}],objects:[]}
{goal:{xPos:200,yPos:200,sizeX:450,sizeY:100,thickness:0.2},projectile:{xPos:350,yPos:200,mass:5,radius:10},math:{},xPosPivot:200,yPosPivot:200,isTraceInitialised:[false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false],traces:[{x:-10,y:-10},{x:-10,y:-10},{x:-10,y:-10},{x:-10,y:-10},{x:-10,y:-10},{x:-10,y:-10},{x:-10,y:-10},{x:-10,y:-10},{x:-10,y:-10},{x:-10,y:-10},{x:-10,y:-10},{x:-10,y:-10},{x:-10,y:-10},{x:-10,y:-10},{x:-10,y:-10},{x:-10,y:-10},{x:-10,y:-10},{x:-10,y:-10},{x:-10,y:-10},{x:-10,y:-10},{x:-10,y:-10},{x:-10,y:-10},{x:-10,y:-10},{x:-10,y:-10},{x:-10,y:-10},{x:-10,y:-10},{x:-10,y:-10},{x:-10,y:-10},{x:-10,y:-10},{x:-10,y:-10},{x:-10,y:-10},{x:-10,y:-10},{x:-10,y:-10},{x:-10,y:-10},{x:-10,y:-10},{x:-10,y:-10},{x:-10,y:-10},{x:-10,y:-10},{x:-10,y:-10},{x:-10,y:-10},{x:-10,y:-10},{x:-10,y:-10},{x:-10,y:-10},{x:-10,y:-10},{x:-10,y:-10},{x:-10,y:-10},{x:-10,y:-10},{x:-10,y:-10},{x:-10,y:-10},{x:-10,y:-10}],objects:[]}

Loading…
Cancel
Save