Skip to content

Commit

Permalink
Prepared everything for the beta release.
Browse files Browse the repository at this point in the history
Increased meteorite damage.
Fixed "Retry" bug.
  • Loading branch information
MrGussio committed Jun 17, 2017
1 parent 5b14488 commit 0078616
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 7 deletions.
4 changes: 2 additions & 2 deletions core/src/ga/gussio/ld38/earthinvaders/Game.java
Original file line number Diff line number Diff line change
Expand Up @@ -101,8 +101,8 @@ public boolean scrolled(int amount) {
}

public static void setCurrentScreen(Screen s){
// if(currentScreen != null)
//// currentScreen.dispose();
if(currentScreen != null)
currentScreen.dispose();
if(listeners.contains(currentScreen))
listeners.remove(currentScreen);
currentScreen = s;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ public void tick() {
collision.setX(x);
collision.setY(y);
if(collision.hasCollision(GameScreen.earth)){
GameScreen.damageEarth((int)health*3);
GameScreen.damageEarth((int)health*5);
// Game.playSound("METEOR1.wav", false, -20);
destroy();
}
Expand Down
7 changes: 5 additions & 2 deletions core/src/ga/gussio/ld38/earthinvaders/screen/GameScreen.java
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ public class GameScreen extends Screen implements InputListener {
private int scoreTimer = 0;

public GameScreen() {
entities.clear();
camera = new OrthographicCamera();
viewport = new FitViewport(Game.WIDTH, Game.HEIGHT, camera);
viewport.apply();
Expand Down Expand Up @@ -93,7 +94,6 @@ public GameScreen() {
int y = r.nextInt(Game.HEIGHT);
background[i] = new Particle(x, y, 0, 0, -1, new Color(207/255f, 187/255f, 20/255f, 1f), size);
}
score = 0; // resetting static value
}

@Override
Expand Down Expand Up @@ -210,7 +210,10 @@ public void dispose() {
for(int i = 0; i < meteoriteSprites.length; i++){
meteoriteSprites[i].getTexture().dispose();
}
System.out.print("dispose");

health = maxHealth;
score = 0;
dmgAnimation = 0;
}

public static void damageEarth(int hits){
Expand Down
6 changes: 4 additions & 2 deletions core/src/ga/gussio/ld38/earthinvaders/screen/MenuScreen.java
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,15 @@ public class MenuScreen extends Screen implements InputListener {
private Particle[] background;
private Sprite logo;
private Button play;

private BitmapFont betaText;
public MenuScreen(){
camera = new OrthographicCamera();
viewport = new FitViewport(Game.WIDTH, Game.HEIGHT, camera);
viewport.apply();
camera.position.set(Game.WIDTH/2, Game.HEIGHT/2, 0);
camera.update();

betaText = new BitmapFont(Gdx.files.internal("score.fnt"), Gdx.files.internal("score.png"), false);
betaText.getData().setScale(0.35f);
logo = new Sprite(new Texture("logo.png"));
Random r = new Random();
background = new Particle[r.nextInt(55-45)+45];
Expand Down Expand Up @@ -65,6 +66,7 @@ public void render(SpriteBatch sb, ShapeRenderer sr) {
sb.begin();
sb.draw(logo, Game.WIDTH/2-(logo.getTexture().getWidth()*10)/2, Game.HEIGHT-50-logo.getHeight()*10, logo.getWidth()*10, logo.getHeight()*10);
play.renderSB(sb);
betaText.draw(sb, "Beta Release - Copyright 2017 Gussio. All rights reserved. Visit https://gussio.ga/ for more info.", 10, 25);
sb.end();
}

Expand Down

0 comments on commit 0078616

Please sign in to comment.