diff options
| author | ilotterytea <iltsu@alright.party> | 2022-09-01 23:18:03 +0600 |
|---|---|---|
| committer | ilotterytea <iltsu@alright.party> | 2022-09-01 23:18:03 +0600 |
| commit | 5bf11db8631e37338ccde00555abba0f45de28db (patch) | |
| tree | 1b87be404b6d38079fd187619877a33a6175287c /core | |
| parent | ebf38397a8180467d2056f651f9ecf22d958a2ca (diff) | |
казуальщики ...
Diffstat (limited to 'core')
| -rw-r--r-- | core/src/com/ilotterytea/maxoning/screens/GameScreen.java | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/core/src/com/ilotterytea/maxoning/screens/GameScreen.java b/core/src/com/ilotterytea/maxoning/screens/GameScreen.java index d1ac5d7..8b21597 100644 --- a/core/src/com/ilotterytea/maxoning/screens/GameScreen.java +++ b/core/src/com/ilotterytea/maxoning/screens/GameScreen.java @@ -330,6 +330,33 @@ public class GameScreen implements Screen, InputProcessor { game.setScreen(new MenuScreen(game)); dispose(); } + if (Gdx.input.isKeyPressed(Input.Keys.SPACE) || Gdx.input.isKeyPressed(Input.Keys.UP)) { + maxonCat.nextFrame(); + maxon.setDrawable(maxonCat.getDrawable()); + player.points += 1 * player.multiplier; + + final TypingLabel label = new TypingLabel("{SHAKE}{RAINBOW}+" + Math.round(1 * player.multiplier) + "{ENDRAINBOW}{ENDSHAKE}", skin, "default"); + + label.setPosition( + maxon.getX() + (maxon.getWidth() / 2f) - 8, + maxon.getY() + maxon.getHeight() + ); + + label.addAction(Actions.parallel( + Actions.fadeOut(5f), + Actions.moveTo( + label.getX(), label.getY() + (float) Math.floor(Math.random() * 156), 5f, Interpolation.exp5Out) + )); + + Timer.schedule(new Timer.Task() { + @Override + public void run() { + label.remove(); + } + }, 10f); + + stage.addActor(label); + } return false; } |
