|
|
|
@ -10,7 +10,9 @@ import com.badlogic.gdx.Gdx;
|
|
|
|
import com.badlogic.gdx.Input;
|
|
|
|
import com.badlogic.gdx.Input;
|
|
|
|
import com.badlogic.gdx.graphics.Color;
|
|
|
|
import com.badlogic.gdx.graphics.Color;
|
|
|
|
import com.badlogic.gdx.graphics.GL20;
|
|
|
|
import com.badlogic.gdx.graphics.GL20;
|
|
|
|
|
|
|
|
import com.badlogic.gdx.graphics.Texture;
|
|
|
|
import com.badlogic.gdx.graphics.g2d.BitmapFont;
|
|
|
|
import com.badlogic.gdx.graphics.g2d.BitmapFont;
|
|
|
|
|
|
|
|
import com.badlogic.gdx.graphics.g2d.Sprite;
|
|
|
|
import com.badlogic.gdx.graphics.g2d.SpriteBatch;
|
|
|
|
import com.badlogic.gdx.graphics.g2d.SpriteBatch;
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
@ -19,8 +21,18 @@ import com.badlogic.gdx.graphics.g2d.SpriteBatch;
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
public class Titlescreen extends AbstractScreen{
|
|
|
|
public class Titlescreen extends AbstractScreen{
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
BitmapFont font;
|
|
|
|
|
|
|
|
SpriteBatch batch;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Sprite clicktostart;
|
|
|
|
|
|
|
|
|
|
|
|
public Titlescreen(Game game){
|
|
|
|
public Titlescreen(Game game){
|
|
|
|
super(game);
|
|
|
|
super(game);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
batch = new SpriteBatch();
|
|
|
|
|
|
|
|
clicktostart = new Sprite(new Texture(Gdx.files.internal("clicktostart.png")));
|
|
|
|
|
|
|
|
clicktostart.setX(Gdx.graphics.getWidth() / 2 - clicktostart.getWidth() / 2);
|
|
|
|
|
|
|
|
clicktostart.setY(Gdx.graphics.getHeight() / 2 - clicktostart.getHeight() / 2);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|
@ -32,13 +44,7 @@ public class Titlescreen extends AbstractScreen{
|
|
|
|
Gdx.gl.glClearColor(1f, 1f, 1f, 1f);
|
|
|
|
Gdx.gl.glClearColor(1f, 1f, 1f, 1f);
|
|
|
|
Gdx.gl.glClear(GL20.GL_COLOR_BUFFER_BIT);
|
|
|
|
Gdx.gl.glClear(GL20.GL_COLOR_BUFFER_BIT);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
BitmapFont font = new BitmapFont();
|
|
|
|
|
|
|
|
font.setColor(Color.RED);
|
|
|
|
|
|
|
|
SpriteBatch batch = new SpriteBatch();
|
|
|
|
|
|
|
|
batch.begin();
|
|
|
|
batch.begin();
|
|
|
|
font.draw(batch, "TITLESCREEN", 250, 250);
|
|
|
|
|
|
|
|
batch.end();
|
|
|
|
batch.end();
|
|
|
|
|
|
|
|
|
|
|
|
if(Gdx.input.justTouched()){
|
|
|
|
if(Gdx.input.justTouched()){
|
|
|
|
|