master
GammelJan 6 years ago
parent ad315bed1c
commit 3cf339bb8b

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

After

Width:  |  Height:  |  Size: 4.8 KiB

@ -74,7 +74,7 @@ public class Controller extends ApplicationAdapter implements InputProcessor{
public void create(){
checkDoor = false;
checkDie = false;
checkDie = true;
end = false;
playerSkin = 0;
@ -88,7 +88,10 @@ public class Controller extends ApplicationAdapter implements InputProcessor{
batch = new SpriteBatch();
mm = new MainMenuScreen(volume);
dg = new DungeonGenerator();
gs = null;
cs = null;
hc = null;
es = null;
d = dg.generateDungeon(roomX - 1, roomY - 1, 48, new Player());
dg.ichWillSpielen(d);
@ -98,7 +101,7 @@ public class Controller extends ApplicationAdapter implements InputProcessor{
roomAmount = d.getLevel()[0].getRooms().length;
level = 0;
level = 6;
roomPosX = roomAmount / 2;
roomPosY = roomAmount / 2;
@ -301,7 +304,7 @@ public class Controller extends ApplicationAdapter implements InputProcessor{
if(es == null){
isPaused = true;
entityMovement.stop();
gs.stop();
gs.end();
gs.getCamera().update();
batch.setProjectionMatrix(gs.getCamera().combined);
gs = null;
@ -438,15 +441,13 @@ public class Controller extends ApplicationAdapter implements InputProcessor{
}
if(d.getPlayer().getHp() <= 0 && checkDie){
//gs.stop();
//create(); //TODO
//d.getPlayer().setHp(1);
if(gs.player.getDie() == 0){
gs.player.setDie(1);
d.getPlayer().setToDelete(true);
}
else if(gs.player.getDie() == 2){
// Ist Tot
end = true;
return;
}
}
@ -827,7 +828,7 @@ public class Controller extends ApplicationAdapter implements InputProcessor{
{
if(button == Input.Buttons.LEFT){
switch(click(screenX, screenY)){
case -1: // -1: nothing hit -- 0: go ingame -- 1: EXIT game -- 2: goto settings -- 3: goto controls -- 4: goto MainMenuScreen -- 9: volume down -- 10: volume up
case -1: // -1: nothing hit -- 0: go ingame -- 1: EXIT game -- 2: goto settings -- 3: goto controls -- 4: goto MainMenuScreen -- 9: volume down -- 10: volume up -- 11: restart game
return true;
case 0:
@ -860,7 +861,7 @@ public class Controller extends ApplicationAdapter implements InputProcessor{
case 4:
ss = null;
cs = null;
mm.appear();
mm.show();
return true;
case 5:
@ -896,7 +897,7 @@ public class Controller extends ApplicationAdapter implements InputProcessor{
}
return true;
case 11:
//create();
create();
break;
}
@ -910,6 +911,9 @@ public class Controller extends ApplicationAdapter implements InputProcessor{
}
public int click(int x, int y){
if(es != null){
return es.click(x, y);
}
if(ps != null){
return ps.click(x,y);
}
@ -924,9 +928,6 @@ public class Controller extends ApplicationAdapter implements InputProcessor{
}
if(gs != null && isPaused == true){
}
if(es != null){
}
return -1;
}

@ -20,11 +20,17 @@ import com.badlogic.gdx.math.Rectangle;
* @author Jan
*/
public class EndScreen {
float w;
float h;
Sprite backButton;
public EndScreen(){
w = Gdx.graphics.getWidth();
h = Gdx.graphics.getHeight();
float wc = w/2;
backButton = new Sprite(new Texture("sprites/backButton.png"));
backButton.setPosition(0, 0);
}
@ -38,7 +44,7 @@ public class EndScreen {
public int click(int x, int y){
Rectangle r = new Rectangle(x,y,1,1);
Rectangle r = new Rectangle(x,h-y,1,1);
if(Intersector.overlaps(r, backButton.getBoundingRectangle())){
return 11; //NEUSTART
}

@ -432,6 +432,7 @@ public class GameScreen {
public void cleanUp(){
music.dispose();
animations.clear();
animatePlayer.clear();
}
public void startLoadingScreen(){
@ -470,7 +471,6 @@ public class GameScreen {
camera.translate(625f, 241f);
animations.stop();
animatePlayer.stop();
music.dispose();
}
public void resume(){
camera.zoom = 700;
@ -478,6 +478,13 @@ public class GameScreen {
animations.start();
animatePlayer.start();
}
public void end(){
camera.zoom = 1600;
camera.translate(625f, 241f);
animations.stop();
animatePlayer.stop();
cleanUp();
}
public void createDmgFont(int value, int startX, int startY){
for(int i = 0; i < dmgContainer.length; i++){

@ -199,7 +199,7 @@ public class MainMenuScreen{
hidden = true;
}
public void appear(){
public void show(){
hidden = false;
}

@ -59,9 +59,6 @@ public class PauseScreen{
public void render (SpriteBatch batch, float volume, OrthographicCamera camera) {
Gdx.gl.glClearColor(0, 0, 0, 1);
Gdx.gl.glClear(GL20.GL_COLOR_BUFFER_BIT);
volumeButtonSprite.setPosition(0, 150);
volumeDownSprite.setPosition(volumeButtonSprite.getX() + 230, volumeButtonSprite.getY()+28);

@ -11,7 +11,7 @@ public class DesktopLauncher {
config.width = 1600;
config.height = 900;
config.title = "The fRestless Caverns - Der beste Dungeon Crawler ALLER ZEITEN";
config.title = "The Restless Caverns - Der beste Dungeon Crawler ALLER ZEITEN";
config.resizable = true;

Loading…
Cancel
Save