Jonathan Hager 6 years ago
parent 567c735ad6
commit 6f7efa6e9c

@ -22,7 +22,9 @@ import com.badlogic.gdx.utils.viewport.Viewport;
import java.io.File;
import java.util.ArrayList;
import model.Goal;
import model.Level;
import model.Projectile;
import view.Chapterscreen;
import view.Gamescreen;
import view.Levelscreen;
@ -93,11 +95,10 @@ public class Controller extends ApplicationAdapter implements InputProcessor{
currentChapter = 1;
Json json = new 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);
FileHandle fileblub = Gdx.files.local("levellol.json");
fileblub.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);

@ -26,7 +26,6 @@ public class Titlescreen{
BitmapFont font;
Timer t;
Sprite clicktostart;
boolean movement;
float GAME_WORLD_WIDTH;
float GAME_WORLD_HEIGHT;
@ -37,7 +36,6 @@ public class Titlescreen{
this.GAME_WORLD_WIDTH = width;
this.GAME_WORLD_HEIGHT = height;
movement = true;
clicktostart = new Sprite(new Texture(Gdx.files.internal("clicktostart.png")));
t = new Timer();
@ -48,9 +46,9 @@ public class Titlescreen{
parameter.size = 21;
font = generator.generateFont(parameter); // font size 12 pixels
generator.dispose(); // don't forget to dispose to avoid memory leaks!
clicktostartX = GAME_WORLD_WIDTH / 2 - getTextWidth("click to start ...") / 2;
clicktostartY = GAME_WORLD_HEIGHT / 2 - clicktostart.getHeight() / 2;
clicktostartY = GAME_WORLD_HEIGHT / 2;
font.setColor(Color.BLACK);

Loading…
Cancel
Save