GammelJan 6 years ago
parent 10528a47d5
commit 58dbf976b9

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 18 KiB

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 18 KiB

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 19 KiB

After

Width:  |  Height:  |  Size: 15 KiB

@ -46,7 +46,7 @@ public class Controller extends ApplicationAdapter implements InputProcessor{
boolean isColliding; boolean isColliding;
Level[] level; Level[] level;
int currentLevel; int currentLevel;
int beatenLevel = 9; int beatenLevel = 0;
OrthographicCamera camera; OrthographicCamera camera;

@ -28,7 +28,6 @@ public class Winscreen{
Sprite level; Sprite level;
Sprite next; Sprite next;
Sprite winSprite;
boolean movement; boolean movement;
float GAME_WORLD_WIDTH; float GAME_WORLD_WIDTH;
@ -50,23 +49,24 @@ public class Winscreen{
this.lvl = lvl; this.lvl = lvl;
if(win){ if(win){
FreeTypeFontGenerator generator = new FreeTypeFontGenerator(Gdx.files.internal("font.ttf")); FreeTypeFontGenerator generator = new FreeTypeFontGenerator(Gdx.files.internal("font.ttf"));
FreeTypeFontGenerator.FreeTypeFontParameter parameter = new FreeTypeFontGenerator.FreeTypeFontParameter(); FreeTypeFontGenerator.FreeTypeFontParameter parameter = new FreeTypeFontGenerator.FreeTypeFontParameter();
parameter.size = 21; parameter.size = 21;
font = generator.generateFont(parameter); // font size 12 pixels font = generator.generateFont(parameter); // font size 12 pixels
generator.dispose(); // don't forget to dispose to avoid memory leaks! generator.dispose(); // don't forget to dispose to avoid memory leaks!
font.setColor(Color.BLACK); font.setColor(Color.BLACK);
movementWin = true; movementWin = true;
winSprite = new Sprite(new Texture(Gdx.files.internal("win.png"))); winX = GAME_WORLD_WIDTH /2 - getTextWidth("Level win") / 2;
winSprite.setX(GAME_WORLD_WIDTH / 2 - winSprite.getWidth() / 2); winY = GAME_WORLD_HEIGHT * 0.85f;
winSprite.setY(GAME_WORLD_HEIGHT * 0.7f - winSprite.getHeight() / 2);
} }
float w = GAME_WORLD_WIDTH; float w = GAME_WORLD_WIDTH;
float h = GAME_WORLD_HEIGHT; float h = GAME_WORLD_HEIGHT;
next = new Sprite(new Texture("skipicon.png")); next = new Sprite(new Texture("skipicon.png"));
next.setPosition(w * 0.75f - next.getWidth()/2, h*0.35f - next.getHeight()/2); next.setPosition(w * 0.75f - next.getWidth()/2, h*0.35f - next.getHeight()/2);
@ -79,9 +79,9 @@ public class Winscreen{
t.scheduleTask(new Timer.Task() { t.scheduleTask(new Timer.Task() {
@Override @Override
public void run() { public void run() {
if(winY < GAME_WORLD_HEIGHT * 0.7) if(winY < GAME_WORLD_HEIGHT * 0.8)
movementWin = true; movementWin = true;
else if(winY > GAME_WORLD_HEIGHT * 0.8) else if(winY > GAME_WORLD_HEIGHT * 0.9)
movementWin = false; movementWin = false;
if(movementWin) if(movementWin)
winY = winY + 3; winY = winY + 3;
@ -98,9 +98,9 @@ public class Winscreen{
level.draw(batch); level.draw(batch);
reset.draw(batch); reset.draw(batch);
if(win){ if(win){
font.getData().setScale(2); font.getData().setScale(8);
winX = GAME_WORLD_WIDTH / 2 - getTextWidth("click to start ...") / 2; winX = GAME_WORLD_WIDTH /2 - getTextWidth("Level win") / 2;
font.draw(batch, "click to start ...", winX, winY); font.draw(batch, "Level win", winX, winY);
} }

Loading…
Cancel
Save