Icons, tutorial

master
GammelJAN 5 years ago
parent ff029b17ad
commit a1cba3fa8f

Binary file not shown.

After

Width:  |  Height:  |  Size: 894 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 612 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 668 B

@ -32,7 +32,7 @@ public class Controller extends ApplicationAdapter implements InputProcessor {
final int GAME_WORLD_WIDTH = 1600;
final int GAME_WORLD_HEIGHT = 900;
final int WALL_LIFETIME = 75;
final int WALL_LIFETIME = 30;
int difficulty = 1;

@ -9,7 +9,7 @@ import java.util.ArrayList;
public class Model {
final int WALL_LIFETIME = 75;
final int WALL_LIFETIME = 30;
private Monster monster;
private ArrayList<Wall> walls;

@ -84,7 +84,7 @@ public class Monster {
batch.begin();
font.getData().setScale(0.8f);
font.setColor(Color.WHITE);
font.draw(batch, "Hunger",xPos - 22, yPos + 71);
font.draw(batch, "Saturation",xPos - 22, yPos + 71);
font.getData().setScale(1f);
font.setColor(Color.BLACK);
batch.end();

@ -15,6 +15,7 @@ public class EndScreen extends Screen {
boolean lost;
public EndScreen(int GAME_WORLD_WIDTH, int GAME_WORLD_HEIGHT, boolean lost, float volume){
super(GAME_WORLD_WIDTH, GAME_WORLD_HEIGHT, 2, volume);
this.lost = lost;
@ -54,6 +55,8 @@ public class EndScreen extends Screen {
texts.add(new Text(1300, 150, "Ingame music by Jan125@opengameart.org", Color.BLACK, 1, 0,0));
texts.add(new Text(1300, 120, "Victory tune by Macto@opengameart.org", Color.BLACK, 1, 0,0));
texts.add(new Text(1300, 90, "Lose music by Jan125@opengameart.org", Color.BLACK, 1, 0,0));
texts.add(new Text(1050, 60, "Game Developed by:", Color.BLACK, 1, 0,0));
texts.add(new Text(1250, 25, "GammelJAN@GitLab JonathanHager@GitLab", Color.BLACK, 1.5, 0,0));
}
@Override

@ -13,6 +13,9 @@ import com.trs.game.view.Text;
public class GameScreen extends Screen {
float currentSeconds;
float tutorialDuration = 130;
public GameScreen(int GAME_WORLD_WIDTH, int GAME_WORLD_HEIGHT, float volume){
super(GAME_WORLD_WIDTH, GAME_WORLD_HEIGHT, 1, volume);
music = Gdx.audio.newMusic(Gdx.files.internal("game.ogg"));
@ -23,11 +26,28 @@ public class GameScreen extends Screen {
@Override
public void timer() {
currentSeconds++;
}
@Override
public void render(SpriteBatch batch, ShapeRenderer renderer, BitmapFont font) {
float Value = 1f-((tutorialDuration-currentSeconds) / ((float)tutorialDuration));
Color color = new Color(Value,Value,Value,1);
batch.begin();
font.setColor(color);
System.out.println(Value);
if(Value <= 1){
if(texts.size() > 0){
texts.remove(texts.size()-1);
texts.remove(texts.size()-1);
}
texts.add(new Text((int)(0.5f*1600f), (int)(0.7f*900f),"Don't let the Monster eat the people!", color,2.5,0,0));
texts.add(new Text((int)(0.5f*1600f), (int)(0.6f*900f),"Drag to create a wall!", color,1.5,0,0));
}
font.setColor(Color.BLACK);
batch.end();
for(Button button : buttons){
button.render(batch,renderer,font);
}

@ -1,5 +1,6 @@
package com.trs.game.desktop;
import com.badlogic.gdx.Files;
import com.badlogic.gdx.backends.lwjgl.LwjglApplication;
import com.badlogic.gdx.backends.lwjgl.LwjglApplicationConfiguration;
import com.trs.game.Controller;
@ -11,6 +12,10 @@ public class DesktopLauncher {
config.height = 900;
config.samples = 8;
config.resizable = false;
config.addIcon("icons/icon_128.png", Files.FileType.Internal);
config.addIcon("icons/icon_32.png", Files.FileType.Internal);
config.addIcon("icons/icon_16.png", Files.FileType.Internal);
config.title = "StarveTheMonster";
new LwjglApplication(new Controller(), config);
}
}

Loading…
Cancel
Save