diff --git a/core/assets/icons/icon_128.png b/core/assets/icons/icon_128.png new file mode 100644 index 0000000..3a07ccd Binary files /dev/null and b/core/assets/icons/icon_128.png differ diff --git a/core/assets/icons/icon_16.png b/core/assets/icons/icon_16.png new file mode 100644 index 0000000..600c9e3 Binary files /dev/null and b/core/assets/icons/icon_16.png differ diff --git a/core/assets/icons/icon_32.png b/core/assets/icons/icon_32.png new file mode 100644 index 0000000..bcf5aa4 Binary files /dev/null and b/core/assets/icons/icon_32.png differ diff --git a/core/src/com/trs/game/Controller.java b/core/src/com/trs/game/Controller.java index c45ccec..814706c 100644 --- a/core/src/com/trs/game/Controller.java +++ b/core/src/com/trs/game/Controller.java @@ -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; diff --git a/core/src/com/trs/game/model/Model.java b/core/src/com/trs/game/model/Model.java index 96e1d64..46e9673 100644 --- a/core/src/com/trs/game/model/Model.java +++ b/core/src/com/trs/game/model/Model.java @@ -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 walls; diff --git a/core/src/com/trs/game/model/Monster.java b/core/src/com/trs/game/model/Monster.java index f9026bd..f7a684d 100644 --- a/core/src/com/trs/game/model/Monster.java +++ b/core/src/com/trs/game/model/Monster.java @@ -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(); diff --git a/core/src/com/trs/game/view/Screens/EndScreen.java b/core/src/com/trs/game/view/Screens/EndScreen.java index a8127d1..17693cc 100644 --- a/core/src/com/trs/game/view/Screens/EndScreen.java +++ b/core/src/com/trs/game/view/Screens/EndScreen.java @@ -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 diff --git a/core/src/com/trs/game/view/Screens/GameScreen.java b/core/src/com/trs/game/view/Screens/GameScreen.java index 00c6267..660ea95 100644 --- a/core/src/com/trs/game/view/Screens/GameScreen.java +++ b/core/src/com/trs/game/view/Screens/GameScreen.java @@ -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); } diff --git a/desktop/src/com/trs/game/desktop/DesktopLauncher.java b/desktop/src/com/trs/game/desktop/DesktopLauncher.java index fda0a71..31b51bd 100644 --- a/desktop/src/com/trs/game/desktop/DesktopLauncher.java +++ b/desktop/src/com/trs/game/desktop/DesktopLauncher.java @@ -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); } }