|
|
|
|
@ -7,6 +7,7 @@ package com.dungeoncrawler.view;
|
|
|
|
|
|
|
|
|
|
import com.badlogic.gdx.Gdx;
|
|
|
|
|
import com.badlogic.gdx.graphics.GL20;
|
|
|
|
|
import com.badlogic.gdx.graphics.Texture;
|
|
|
|
|
import com.badlogic.gdx.graphics.g2d.Sprite;
|
|
|
|
|
import com.badlogic.gdx.graphics.g2d.SpriteBatch;
|
|
|
|
|
import com.badlogic.gdx.graphics.g2d.TextureRegion;
|
|
|
|
|
@ -19,6 +20,13 @@ import com.badlogic.gdx.math.Rectangle;
|
|
|
|
|
*/
|
|
|
|
|
public class EndScreen {
|
|
|
|
|
|
|
|
|
|
Sprite backButton;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public EndScreen(){
|
|
|
|
|
backButton = new Sprite(new Texture("sprites/backButton.png"));
|
|
|
|
|
backButton.setPosition(100, 100);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void render (SpriteBatch batch, float volume) {
|
|
|
|
|
Gdx.gl.glClearColor(0, 0, 0, 1);
|
|
|
|
|
@ -30,10 +38,10 @@ public class EndScreen {
|
|
|
|
|
|
|
|
|
|
public int click(int x, int y){ // prueft ob cursor mit button (START) ueberlappt
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//if(Intersector.overlaps(r, backButtonSprite.getBoundingRectangle())){
|
|
|
|
|
// return 5; //proceed Game
|
|
|
|
|
//}
|
|
|
|
|
Rectangle r = new Rectangle(x,y,1,1);
|
|
|
|
|
if(Intersector.overlaps(r, backButton.getBoundingRectangle())){
|
|
|
|
|
return 11; //NEUSTART
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return -1;
|
|
|
|
|
|
|
|
|
|
|