v1.2.1: fixed an error with new game over buttons and re-final commit

This commit is contained in:
Evan Debenham
2022-04-01 12:11:04 -04:00
parent 85a8b8652b
commit 19c0e8e4cf
2 changed files with 10 additions and 10 deletions

View File

@@ -1190,7 +1190,7 @@ public class GameScene extends PixelScene {
public static void gameOver() {
Banner gameOver = new Banner( BannerSprites.get( BannerSprites.Type.GAME_OVER ) );
gameOver.show( 0x000000, 1f );
gameOver.show( 0x000000, 2f );
scene.showBanner( gameOver );
StyledButton restart = new StyledButton(Chrome.Type.GREY_BUTTON_TR, Messages.get(StartScene.class, "new"), 9){
@@ -1204,13 +1204,13 @@ public class GameScene extends PixelScene {
@Override
public void update() {
bg.alpha(gameOver.am);
icon.alpha(gameOver.am);
text.alpha(gameOver.am);
alpha(gameOver.am);
super.update();
}
};
restart.camera = uiCamera;
restart.icon(Icons.get(Icons.ENTER));
restart.alpha(0);
restart.camera = uiCamera;
float offset = Camera.main.centerOffset.y;
restart.setSize(Math.max(80, restart.reqWidth()), 20);
restart.setPos(
@@ -1227,13 +1227,13 @@ public class GameScene extends PixelScene {
@Override
public void update() {
bg.alpha(gameOver.am);
icon.alpha(gameOver.am);
text.alpha(gameOver.am);
alpha(gameOver.am);
super.update();
}
};
menu.camera = uiCamera;
menu.icon(Icons.get(Icons.PREFS));
menu.alpha(0);
menu.camera = uiCamera;
menu.setSize(Math.max(80, menu.reqWidth()), 20);
menu.setPos(
align(uiCamera, (menu.camera.width - menu.width()) / 2),