diff options
| author | ilotterytea <iltsu@alright.party> | 2022-08-28 00:14:37 +0600 |
|---|---|---|
| committer | ilotterytea <iltsu@alright.party> | 2022-08-28 00:14:37 +0600 |
| commit | 5ce75c990a9f7b77a5c52afb565b3ba92a07593a (patch) | |
| tree | d6d7c0502fc43eb298ba70900b4cd9acba2939da /core | |
| parent | 6f51ff588dab68bb9eb80802542082afb7686ce9 (diff) | |
немного прокачал анимации и подготовка к разработке главного меню
Diffstat (limited to 'core')
| -rw-r--r-- | core/src/com/ilotterytea/maxoning/screen/MenuScreen.java | 45 | ||||
| -rw-r--r-- | core/src/com/ilotterytea/maxoning/screen/SplashScreen.java | 1 |
2 files changed, 37 insertions, 9 deletions
diff --git a/core/src/com/ilotterytea/maxoning/screen/MenuScreen.java b/core/src/com/ilotterytea/maxoning/screen/MenuScreen.java index b07f3c1..be8e1f4 100644 --- a/core/src/com/ilotterytea/maxoning/screen/MenuScreen.java +++ b/core/src/com/ilotterytea/maxoning/screen/MenuScreen.java @@ -34,7 +34,7 @@ public class MenuScreen implements Screen, InputProcessor { private ArrayList<ArrayList<Sprite>> wallTiles = new ArrayList<>(); - private boolean anyKeyPressed = false; + private boolean anyKeyPressed = false, brandActionsSet = false; public MenuScreen(MaxonGame game) { this.game = game; @@ -61,10 +61,10 @@ public class MenuScreen implements Screen, InputProcessor { this.maxonLogo = new Image(maxonTxr); this.brandLogo = new Image(brandTxr); - this.startLabel = new Label("PRESS ANY KEY TO START", skin, "press"); + this.startLabel = new Label("PRESS START", skin, "press"); this.infoLabel = new Label(String.format("%s %s", MaxonConstants.GAME_NAME, MaxonConstants.GAME_VERSION), skin, "credits"); - brandLogo.setScale(0f); + brandLogo.setScale(100f); brandLogo.setPosition( (Gdx.graphics.getWidth() / 2.0f) - (brandLogo.getWidth() / 2.0f), @@ -78,8 +78,11 @@ public class MenuScreen implements Screen, InputProcessor { brandLogo.addAction( Actions.sequence( - Actions.scaleTo(50f, 50f, 0f), - Actions.scaleTo(1f, 1f, 5f, Interpolation.circleIn), + Actions.alpha(0), + Actions.parallel( + Actions.fadeIn(1f), + Actions.scaleTo(1f, 1f, 1f, Interpolation.pow2InInverse) + ), Actions.repeat( RepeatAction.FOREVER, Actions.sequence( @@ -153,13 +156,37 @@ public class MenuScreen implements Screen, InputProcessor { } }*/ - if (anyKeyPressed) { + if (anyKeyPressed && !brandActionsSet) { startLabel.clearActions(); - startLabel.addAction( + startLabel.addAction(Actions.fadeOut(0.5f)); + + brandLogo.clearActions(); + brandLogo.addAction( Actions.sequence( - Actions.moveTo(startLabel.getX(), -192, 1f, Interpolation.smoother) - ) + Actions.parallel( + Actions.rotateTo(0f, 2f), + Actions.scaleTo(1f, 1f, 2f), + Actions.moveTo( + (Gdx.graphics.getWidth() / 2f) - (brandTxr.getWidth() / 2f), + (Gdx.graphics.getHeight() - brandTxr.getHeight()) - 81, + 2f, + Interpolation.sine + ) + ), + Actions.repeat(RepeatAction.FOREVER, + Actions.sequence( + Actions.parallel( + Actions.rotateTo(-5f, 5f, Interpolation.smoother), + Actions.scaleTo(0.9f, 0.9f, 5f, Interpolation.smoother) + ), + Actions.parallel( + Actions.rotateTo(5f, 5f, Interpolation.smoother), + Actions.scaleTo(1.1f, 1.1f, 5f, Interpolation.smoother) + ) + ))) ); + + brandActionsSet = true; } stage.draw(); diff --git a/core/src/com/ilotterytea/maxoning/screen/SplashScreen.java b/core/src/com/ilotterytea/maxoning/screen/SplashScreen.java index ee80f17..ff3b1a3 100644 --- a/core/src/com/ilotterytea/maxoning/screen/SplashScreen.java +++ b/core/src/com/ilotterytea/maxoning/screen/SplashScreen.java @@ -115,6 +115,7 @@ public class SplashScreen implements InputProcessor, Screen { Gdx.app.exit(); } if (Gdx.input.isKeyPressed(Input.Keys.ANY_KEY)) { + introMusic.stop(); game.setScreen(new MenuScreen(game)); dispose(); } |
