So fesselnd

master
Jonathan Hager 6 years ago
parent a9fe7a0d97
commit a184dbd584

Binary file not shown.

Binary file not shown.

@ -290,6 +290,7 @@ public class Controller extends ApplicationAdapter implements InputProcessor{
if(v != null){
if(v.click() == -1){}
else if(v.click() == 0){
v.cleanUp();
v = null;
m = new GameScreen(d);
newEntity(new Archer(0,0,0),96,96,0);

@ -1,6 +1,7 @@
package com.dungeoncrawler.view;
import com.badlogic.gdx.Gdx;
import com.badlogic.gdx.audio.Music;
import com.badlogic.gdx.graphics.GL20;
import com.badlogic.gdx.graphics.OrthographicCamera;
import com.badlogic.gdx.graphics.Texture;
@ -45,6 +46,9 @@ public class GameScreen {
TiledMap tm;
OrthographicCamera camera;
// Sound
Music music;
public GameScreen(Dungeon d) {
//CONTROLS
ctr = new Texture("controls.png");
@ -86,6 +90,9 @@ public class GameScreen {
tm = new TiledMap();
tmr = new OrthogonalTiledMapRenderer(tm);
music = Gdx.audio.newMusic(Gdx.files.internal("gamemusic.mp3"));
music.play();
}

@ -1,6 +1,7 @@
package com.dungeoncrawler.view;
import com.badlogic.gdx.Gdx;
import com.badlogic.gdx.audio.Music;
import com.badlogic.gdx.graphics.GL20;
import com.badlogic.gdx.graphics.OrthographicCamera;
import com.badlogic.gdx.graphics.Pixmap;
@ -34,6 +35,9 @@ public class MainMenu{
float h = Gdx.graphics.getHeight();
OrthographicCamera camera;
// Sound
Music music;
public MainMenu() {
//MENU-SCREEN
float w = Gdx.graphics.getWidth();
@ -77,6 +81,10 @@ public class MainMenu{
CursorMoveY = 0f;
//PLAYER
// Sound
music = Gdx.audio.newMusic(Gdx.files.internal("mainmenu.mp3"));
music.play();
}
@ -136,6 +144,10 @@ public class MainMenu{
else{return -1;}
}
public void cleanUp(){
music.dispose();
}

@ -12,6 +12,7 @@ public class DesktopLauncher {
config.width = 1600;
config.height = 900;
config.title = "The Restless Caverns";
config.resizable = false;
//config.addIcon("logo.png", Files.FileType.Internale);
new LwjglApplication(new Controller(), config);

Loading…
Cancel
Save