From 530f258a547e2e3b8cba736de02c80b74ca63ff6 Mon Sep 17 00:00:00 2001 From: Jonathan Hager Date: Sun, 21 Jun 2020 22:01:08 +0200 Subject: [PATCH 1/3] lol --- .../com/throwgame/main/AndroidLauncher.java | 8 +- core/src/controller/Controller.java | 82 +++++++++++++------ 2 files changed, 62 insertions(+), 28 deletions(-) diff --git a/android/src/com/throwgame/main/AndroidLauncher.java b/android/src/com/throwgame/main/AndroidLauncher.java index 4051a8c..4e45bf0 100644 --- a/android/src/com/throwgame/main/AndroidLauncher.java +++ b/android/src/com/throwgame/main/AndroidLauncher.java @@ -1,11 +1,14 @@ package com.throwgame.main; +import android.content.Context; import android.os.Bundle; import com.badlogic.gdx.backends.android.AndroidApplication; import com.badlogic.gdx.backends.android.AndroidApplicationConfiguration; import com.throwgame.main.Main; +import java.io.File; + import controller.Controller; public class AndroidLauncher extends AndroidApplication { @@ -13,6 +16,9 @@ public class AndroidLauncher extends AndroidApplication { protected void onCreate (Bundle savedInstanceState) { super.onCreate(savedInstanceState); AndroidApplicationConfiguration config = new AndroidApplicationConfiguration(); - initialize(new Controller(), config); + Controller controller = new Controller(); + File filesDir = getContext().getFilesDir(); + controller.initContext(filesDir); + initialize(controller, config); } } diff --git a/core/src/controller/Controller.java b/core/src/controller/Controller.java index a0e7e92..cfaa94a 100644 --- a/core/src/controller/Controller.java +++ b/core/src/controller/Controller.java @@ -8,22 +8,24 @@ package controller; import com.badlogic.gdx.ApplicationAdapter; import com.badlogic.gdx.Gdx; import com.badlogic.gdx.InputProcessor; -import com.badlogic.gdx.Preferences; import com.badlogic.gdx.graphics.GL20; import com.badlogic.gdx.graphics.OrthographicCamera; import com.badlogic.gdx.graphics.g2d.SpriteBatch; - -import model.Goal; -import model.Level; -import model.Projectile; -import view.Gamescreen; -import view.Levelscreen; - import com.badlogic.gdx.math.Intersector; import com.badlogic.gdx.math.Rectangle; +import com.badlogic.gdx.utils.Json; import com.badlogic.gdx.utils.Timer; import com.badlogic.gdx.utils.viewport.ExtendViewport; import com.badlogic.gdx.utils.viewport.Viewport; + +import java.io.File; +import java.io.FileInputStream; +import java.io.FileNotFoundException; +import java.util.ArrayList; + +import model.Level; +import view.Gamescreen; +import view.Levelscreen; import view.Titlescreen; import view.Winscreen; @@ -36,6 +38,7 @@ public class Controller extends ApplicationAdapter implements InputProcessor{ final float GAME_WORLD_WIDTH = 1600; final float GAME_WORLD_HEIGHT = 900; + File filesDir; Titlescreen ts; Levelscreen ls; @@ -45,7 +48,7 @@ public class Controller extends ApplicationAdapter implements InputProcessor{ SpriteBatch batch; Timer stepTimer; boolean isColliding; - Level[] level; + ArrayList level; int currentLevel; int beatenLevel = 9; @@ -75,8 +78,9 @@ public class Controller extends ApplicationAdapter implements InputProcessor{ camera.position.set(GAME_WORLD_WIDTH/2, GAME_WORLD_HEIGHT/2, 0); isColliding = false; - level = new Level[10]; + level = new ArrayList<>(); currentLevel = 0; + /* level[0] = new Level(new Goal(500,200,450,100, 0.2f), new Projectile(0,0,0),200,200); level[1] = new Level(new Goal(700,200,450,100, 0.2f), new Projectile(0,0,0),200,200); level[2] = new Level(new Goal(560,400,450,100, 0.2f), new Projectile(0,0,0),200,200); @@ -88,23 +92,43 @@ public class Controller extends ApplicationAdapter implements InputProcessor{ level[8] = new Level(new Goal(760,460,450,100, 0.2f), new Projectile(0,0,0),200,200); level[9] = new Level(new Goal(1000,580,350,100, 0.2f), new Projectile(0,0,0),200,200); level[9].addRectangle(400, 400, 50,200); + */ + + Json json = new Json(); + File levelJson; + for(int i = 0; i < 1000; i++){ + try{ + levelJson = new File(filesDir, "level" + i + ".json"); + if(levelJson == null){ + break; + } + else{ + Level tempLevel = json.fromJson(Level.class, new FileInputStream(levelJson)); + level.add(tempLevel); + } + } + catch(FileNotFoundException e){ + e.printStackTrace(); + break; + } + } stepTimer = new Timer(); stepTimer.scheduleTask(new Timer.Task() { @Override public void run() { if(gs != null){ - if(level[currentLevel].getProjectile().getxPos() > GAME_WORLD_WIDTH || level[currentLevel].getProjectile().getxPos() < 0 || level[currentLevel].getProjectile().getyPos() < 0){ - gs.step(level[currentLevel]); - level[currentLevel].reset(); + if(level.get(currentLevel).getProjectile().getxPos() > GAME_WORLD_WIDTH || level.get(currentLevel).getProjectile().getxPos() < 0 || level.get(currentLevel).getProjectile().getyPos() < 0){ + gs.step(level.get(currentLevel)); + level.get(currentLevel).reset(); gs.dispose(); stepTimer.stop(); gs = null; ws = new Winscreen(GAME_WORLD_WIDTH, GAME_WORLD_HEIGHT, false, currentLevel); } else{ - level[currentLevel].step(); - gs.step(level[currentLevel]); + level.get(currentLevel).step(); + gs.step(level.get(currentLevel)); boolean collision = false; for(Rectangle rect : gs.getGoalRects()){ @@ -113,9 +137,9 @@ public class Controller extends ApplicationAdapter implements InputProcessor{ collision = true; if (!isColliding) { if (rect.getHeight() == 1) { - level[currentLevel].horizontalCollision(); + level.get(currentLevel).horizontalCollision(); } else if (rect.getWidth() == 1) { - level[currentLevel].verticalCollision(); + level.get(currentLevel).verticalCollision(); } isColliding = true; break; @@ -129,9 +153,9 @@ public class Controller extends ApplicationAdapter implements InputProcessor{ collision = true; if (!isColliding) { if (rect.getHeight() == 1) { - level[currentLevel].horizontalCollision(); + level.get(currentLevel).horizontalCollision(); } else if (rect.getWidth() == 1) { - level[currentLevel].verticalCollision(); + level.get(currentLevel).verticalCollision(); } isColliding = true; break; @@ -167,14 +191,14 @@ public class Controller extends ApplicationAdapter implements InputProcessor{ if(ts != null) ts.render(batch); else if(ls != null){ currentLevel = ls.getSelectedLevel(); - ls.render(batch, level[currentLevel]); + ls.render(batch, level.get(currentLevel); } else if(gs != null){ - gs.render(batch, level[currentLevel]); + gs.render(batch, level.get(currentLevel)); if(gs.getWin()){ gs.dispose(); stepTimer.stop(); - level[currentLevel].reset(); + level.get(currentLevel).reset(); if(currentLevel == beatenLevel && currentLevel < levelAmount)beatenLevel++; gs = null; ws = new Winscreen(GAME_WORLD_WIDTH, GAME_WORLD_HEIGHT, true, currentLevel); @@ -189,6 +213,10 @@ public class Controller extends ApplicationAdapter implements InputProcessor{ } + public void initContext(File context){ + this.filesDir = context; + } + @Override public boolean keyDown(int keycode) { camera.translate(5f, 5f); @@ -223,13 +251,13 @@ public class Controller extends ApplicationAdapter implements InputProcessor{ else{ ls.dispose(); ls = null; - gs = new Gamescreen(level[currentLevel], GAME_WORLD_WIDTH, GAME_WORLD_HEIGHT, camera.combined); + gs = new Gamescreen(level.get(currentLevel), GAME_WORLD_WIDTH, GAME_WORLD_HEIGHT, camera.combined); stepTimer.start(); } } else if(gs != null){ - if(!level[currentLevel].released()){ - level[currentLevel].projectileReleased(); + if(!level.get(currentLevel).released()){ + level.get(currentLevel).projectileReleased(); } } else if(ws != null){ @@ -238,13 +266,13 @@ public class Controller extends ApplicationAdapter implements InputProcessor{ ws = null; } else if(x < Gdx.graphics.getWidth() * 0.66){ - gs = new Gamescreen(level[currentLevel], GAME_WORLD_WIDTH, GAME_WORLD_HEIGHT, camera.combined); + gs = new Gamescreen(level.get(currentLevel), GAME_WORLD_WIDTH, GAME_WORLD_HEIGHT, camera.combined); stepTimer.start(); ws = null; } else if(currentLevel < levelAmount && ws.getWin()){ currentLevel++; - gs = new Gamescreen(level[currentLevel], GAME_WORLD_WIDTH, GAME_WORLD_HEIGHT, camera.combined); + gs = new Gamescreen(level.get(currentLevel), GAME_WORLD_WIDTH, GAME_WORLD_HEIGHT, camera.combined); stepTimer.start(); ws = null; } From c810a30d8d00720e0fa27c424313035a6732ee3e Mon Sep 17 00:00:00 2001 From: Jonathan Hager Date: Sun, 21 Jun 2020 22:46:02 +0200 Subject: [PATCH 2/3] rich5tig lol --- core/src/controller/Controller.java | 40 ++++++++++++++++------------- core/src/model/Goal.java | 3 +++ core/src/model/Level.java | 2 ++ core/src/model/Projectile.java | 4 +++ levels/level0.json | 1 + 5 files changed, 32 insertions(+), 18 deletions(-) create mode 100644 levels/level0.json diff --git a/core/src/controller/Controller.java b/core/src/controller/Controller.java index cfaa94a..4769841 100644 --- a/core/src/controller/Controller.java +++ b/core/src/controller/Controller.java @@ -8,6 +8,7 @@ package controller; import com.badlogic.gdx.ApplicationAdapter; import com.badlogic.gdx.Gdx; import com.badlogic.gdx.InputProcessor; +import com.badlogic.gdx.files.FileHandle; import com.badlogic.gdx.graphics.GL20; import com.badlogic.gdx.graphics.OrthographicCamera; import com.badlogic.gdx.graphics.g2d.SpriteBatch; @@ -23,7 +24,9 @@ import java.io.FileInputStream; import java.io.FileNotFoundException; import java.util.ArrayList; +import model.Goal; import model.Level; +import model.Projectile; import view.Gamescreen; import view.Levelscreen; import view.Titlescreen; @@ -80,8 +83,14 @@ public class Controller extends ApplicationAdapter implements InputProcessor{ isColliding = false; level = new ArrayList<>(); currentLevel = 0; + Json json = new Json(); + + /* + Level lol = new Level(new Goal(1000,200,450,100, 0.2f), new Projectile(0,0,0),200,200); + FileHandle file = Gdx.files.local("levels/level0.json"); + file.writeString(json.toJson(lol), false); + */ /* - level[0] = new Level(new Goal(500,200,450,100, 0.2f), new Projectile(0,0,0),200,200); level[1] = new Level(new Goal(700,200,450,100, 0.2f), new Projectile(0,0,0),200,200); level[2] = new Level(new Goal(560,400,450,100, 0.2f), new Projectile(0,0,0),200,200); level[3] = new Level(new Goal(900,150,450,100, 0.2f), new Projectile(0,0,0),200,200); @@ -92,25 +101,20 @@ public class Controller extends ApplicationAdapter implements InputProcessor{ level[8] = new Level(new Goal(760,460,450,100, 0.2f), new Projectile(0,0,0),200,200); level[9] = new Level(new Goal(1000,580,350,100, 0.2f), new Projectile(0,0,0),200,200); level[9].addRectangle(400, 400, 50,200); - */ + */ - Json json = new Json(); - File levelJson; - for(int i = 0; i < 1000; i++){ - try{ - levelJson = new File(filesDir, "level" + i + ".json"); - if(levelJson == null){ - break; - } - else{ - Level tempLevel = json.fromJson(Level.class, new FileInputStream(levelJson)); - level.add(tempLevel); - } - } - catch(FileNotFoundException e){ - e.printStackTrace(); + + FileHandle levelJson; + for(int i = 0; i < 10; i++){ + //levelJson = Gdx.files.local("levels/level" + i + ".json"); + levelJson = Gdx.files.local("levels/level0.json"); + if(!levelJson.exists()){ break; } + else{ + Level tempLevel = json.fromJson(Level.class, levelJson.readString()); + level.add(tempLevel); + } } stepTimer = new Timer(); @@ -191,7 +195,7 @@ public class Controller extends ApplicationAdapter implements InputProcessor{ if(ts != null) ts.render(batch); else if(ls != null){ currentLevel = ls.getSelectedLevel(); - ls.render(batch, level.get(currentLevel); + ls.render(batch, level.get(currentLevel)); } else if(gs != null){ gs.render(batch, level.get(currentLevel)); diff --git a/core/src/model/Goal.java b/core/src/model/Goal.java index cdfa0f6..85e3eb9 100644 --- a/core/src/model/Goal.java +++ b/core/src/model/Goal.java @@ -15,6 +15,9 @@ public class Goal { this.sizeY = sizeY; this.thickness = thickness; } + public Goal(){ + + } public int getxPos() { return xPos; diff --git a/core/src/model/Level.java b/core/src/model/Level.java index fd918df..71ccace 100644 --- a/core/src/model/Level.java +++ b/core/src/model/Level.java @@ -56,6 +56,8 @@ public class Level { traces[i] = new Vector2(-10, -10); } } + public Level(){ + } public void projectileReleased(){ this.isReleased = true; diff --git a/core/src/model/Projectile.java b/core/src/model/Projectile.java index e035efd..ad9c7df 100644 --- a/core/src/model/Projectile.java +++ b/core/src/model/Projectile.java @@ -25,6 +25,10 @@ public class Projectile { } } + public Projectile(){ + type = 0; + } + public double getxPos() { return xPos; } diff --git a/levels/level0.json b/levels/level0.json new file mode 100644 index 0000000..b1ef1e7 --- /dev/null +++ b/levels/level0.json @@ -0,0 +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:[]} \ No newline at end of file From cecfdc8de6b0e6bba3963683a4aa0778fcc7f386 Mon Sep 17 00:00:00 2001 From: Jonathan Hager Date: Sun, 21 Jun 2020 22:58:00 +0200 Subject: [PATCH 3/3] ich bin der manuel --- core/src/controller/Controller.java | 10 +++++----- core/src/view/Gamescreen.java | 2 ++ levels/level1.json | 1 + levels/level2.json | 1 + levels/level3.json | 1 + levels/level4.json | 1 + levels/level5.json | 1 + levels/level6.json | 1 + levels/level7.json | 1 + levels/level8.json | 1 + levels/level9.json | 1 + 11 files changed, 16 insertions(+), 5 deletions(-) create mode 100644 levels/level1.json create mode 100644 levels/level2.json create mode 100644 levels/level3.json create mode 100644 levels/level4.json create mode 100644 levels/level5.json create mode 100644 levels/level6.json create mode 100644 levels/level7.json create mode 100644 levels/level8.json create mode 100644 levels/level9.json diff --git a/core/src/controller/Controller.java b/core/src/controller/Controller.java index 4769841..dda8902 100644 --- a/core/src/controller/Controller.java +++ b/core/src/controller/Controller.java @@ -86,10 +86,10 @@ public class Controller extends ApplicationAdapter implements InputProcessor{ Json json = new Json(); /* - Level lol = new Level(new Goal(1000,200,450,100, 0.2f), new Projectile(0,0,0),200,200); - FileHandle file = Gdx.files.local("levels/level0.json"); + Level lol = new Level(new Goal(1000,580,350,100, 0.2f), new Projectile(0,0,0),200,200); + lol.addRectangle(400, 400, 50,200); + FileHandle file = Gdx.files.local("levels/level9.json"); file.writeString(json.toJson(lol), false); - */ /* level[1] = new Level(new Goal(700,200,450,100, 0.2f), new Projectile(0,0,0),200,200); level[2] = new Level(new Goal(560,400,450,100, 0.2f), new Projectile(0,0,0),200,200); @@ -106,8 +106,8 @@ public class Controller extends ApplicationAdapter implements InputProcessor{ FileHandle levelJson; for(int i = 0; i < 10; i++){ - //levelJson = Gdx.files.local("levels/level" + i + ".json"); - levelJson = Gdx.files.local("levels/level0.json"); + levelJson = Gdx.files.local("levels/level" + i + ".json"); + //levelJson = Gdx.files.local("levels/level0.json"); if(!levelJson.exists()){ break; } diff --git a/core/src/view/Gamescreen.java b/core/src/view/Gamescreen.java index f6089b2..7601596 100644 --- a/core/src/view/Gamescreen.java +++ b/core/src/view/Gamescreen.java @@ -160,11 +160,13 @@ public class Gamescreen{ shapeRenderer.rect(g.getxPos(), g.getyPos(), g.getSizeX(), g.getSizeY()); */ // object hitboxes + /* if(objects != null) { for (Rectangle object : objectRects) { shapeRenderer.rect(object.getX(), object.getY(), object.getWidth(), object.getHeight()); } } + */ shapeRenderer.setColor(Color.GRAY); diff --git a/levels/level1.json b/levels/level1.json new file mode 100644 index 0000000..98ca896 --- /dev/null +++ b/levels/level1.json @@ -0,0 +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:[]} \ No newline at end of file diff --git a/levels/level2.json b/levels/level2.json new file mode 100644 index 0000000..a7211ec --- /dev/null +++ b/levels/level2.json @@ -0,0 +1 @@ +{goal:{xPos:560,yPos:400,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:[]} \ No newline at end of file diff --git a/levels/level3.json b/levels/level3.json new file mode 100644 index 0000000..a512df9 --- /dev/null +++ b/levels/level3.json @@ -0,0 +1 @@ +{goal:{xPos:900,yPos:150,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:[]} \ No newline at end of file diff --git a/levels/level4.json b/levels/level4.json new file mode 100644 index 0000000..ed8a7c6 --- /dev/null +++ b/levels/level4.json @@ -0,0 +1 @@ +{goal:{xPos:500,yPos:600,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:[]} \ No newline at end of file diff --git a/levels/level5.json b/levels/level5.json new file mode 100644 index 0000000..d55f0f5 --- /dev/null +++ b/levels/level5.json @@ -0,0 +1 @@ +{goal:{xPos:400,yPos:220,sizeX:300,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:[]} \ No newline at end of file diff --git a/levels/level6.json b/levels/level6.json new file mode 100644 index 0000000..a88849e --- /dev/null +++ b/levels/level6.json @@ -0,0 +1 @@ +{goal:{xPos:600,yPos:700,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:[]} \ No newline at end of file diff --git a/levels/level7.json b/levels/level7.json new file mode 100644 index 0000000..abd691e --- /dev/null +++ b/levels/level7.json @@ -0,0 +1 @@ +{goal:{xPos:1000,yPos:600,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:[]} \ No newline at end of file diff --git a/levels/level8.json b/levels/level8.json new file mode 100644 index 0000000..02cdbd3 --- /dev/null +++ b/levels/level8.json @@ -0,0 +1 @@ +{goal:{xPos:760,yPos:460,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:[]} \ No newline at end of file diff --git a/levels/level9.json b/levels/level9.json new file mode 100644 index 0000000..bf81933 --- /dev/null +++ b/levels/level9.json @@ -0,0 +1 @@ +{goal:{xPos:1000,yPos:580,sizeX:350,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:[{x:400,y:400,width:50,height:200}]} \ No newline at end of file