summaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
authorilotterytea <iltsu@alright.party>2022-09-01 14:59:50 +0600
committerilotterytea <iltsu@alright.party>2022-09-01 14:59:50 +0600
commit629f257e8c66967610470993bac43b0770ca296c (patch)
tree03314aec4552ebf7c0ca3dd681fdeea6482d99de /core
parent906ca3db58990fb6f05d09c0b9150fb4935a8a50 (diff)
доработанный сплэш экран
Diffstat (limited to 'core')
-rw-r--r--core/src/com/ilotterytea/maxoning/screens/SplashScreen.java50
1 files changed, 42 insertions, 8 deletions
diff --git a/core/src/com/ilotterytea/maxoning/screens/SplashScreen.java b/core/src/com/ilotterytea/maxoning/screens/SplashScreen.java
index b2b0b88..b9138a7 100644
--- a/core/src/com/ilotterytea/maxoning/screens/SplashScreen.java
+++ b/core/src/com/ilotterytea/maxoning/screens/SplashScreen.java
@@ -12,6 +12,8 @@ import com.badlogic.gdx.scenes.scene2d.ui.Skin;
import com.badlogic.gdx.utils.viewport.FillViewport;
import com.ilotterytea.maxoning.MaxonConstants;
import com.ilotterytea.maxoning.MaxonGame;
+import com.ilotterytea.maxoning.ui.DebugLabel;
+import com.ilotterytea.maxoning.utils.AssetLoading;
public class SplashScreen implements InputProcessor, Screen {
@@ -20,8 +22,8 @@ public class SplashScreen implements InputProcessor, Screen {
final Stage stage;
final Skin skin;
- final Image whiteSquare, dev;
- final Label infoLabel;
+ final Image whiteSquare, dev, org;
+ final Label infoLabel, disclaimer, legalLabel;
final Music introMusic;
@@ -30,18 +32,19 @@ public class SplashScreen implements InputProcessor, Screen {
this.introMusic = game.assetManager.get("mus/menu/mus_menu_intro.ogg", Music.class);
-
this.stage = new Stage(new FillViewport(Gdx.graphics.getWidth(), Gdx.graphics.getHeight()));
this.skin = new Skin(Gdx.files.internal("main.skin"));
- this.infoLabel = new Label(
- String.format("%s %s", MaxonConstants.GAME_NAME, MaxonConstants.GAME_VERSION),
- skin, "credits"
- );
+ this.infoLabel = new DebugLabel(skin);
+ this.disclaimer = new Label("This game contains an unbelievable dose of cheeky \"woolbags\". Please, it is not recommended for anyone to play. Any match in real life of the presented images of cats is pure coincidence! All cat images were generated by \"NUT-S\" neural network.", skin, "disclaimer");
+ this.legalLabel = new Label("", skin, "disclaimer");
this.dev = new Image(game.assetManager.get("sprites/ilotterytea.png", Texture.class));
+ this.org = new Image(game.assetManager.get("sprites/supadank.png", Texture.class));
this.whiteSquare = new Image(game.assetManager.get("sprites/white.png", Texture.class));
+ disclaimer.setBounds(0, 0, 800, 600);
+
infoLabel.setPosition(
8,
(Gdx.graphics.getHeight() - infoLabel.getHeight()) - 8
@@ -54,6 +57,16 @@ public class SplashScreen implements InputProcessor, Screen {
(Gdx.graphics.getHeight() / 2.0f) - (dev.getHeight() * 5f / 2.0f)
);
+ org.setPosition(
+ (Gdx.graphics.getWidth() / 2.0f) - (org.getWidth() / 2.0f),
+ (Gdx.graphics.getHeight() / 2.0f) - (org.getHeight() / 2.0f)
+ );
+
+ disclaimer.setPosition(
+ (Gdx.graphics.getWidth() / 2.0f) - (800 / 2.0f),
+ (Gdx.graphics.getHeight() / 2.0f) - (600 / 2.0f)
+ );
+
whiteSquare.setPosition(0, 0);
whiteSquare.setSize(Gdx.graphics.getWidth(), Gdx.graphics.getHeight());
@@ -64,22 +77,43 @@ public class SplashScreen implements InputProcessor, Screen {
Actions.fadeOut(0.25f)
));
+ org.addAction(Actions.sequence(
+ Actions.alpha(0f),
+ Actions.delay(7.3f),
+ Actions.fadeIn(2.5f),
+ Actions.delay(5f),
+ Actions.fadeOut(5f)
+ ));
+
+ disclaimer.addAction(
+ Actions.sequence(
+ Actions.alpha(0f),
+ Actions.delay(19.8f),
+ Actions.fadeIn(1f),
+ Actions.delay(3f),
+ Actions.fadeOut(1f)
+ )
+ );
+
whiteSquare.addAction(Actions.sequence(
Actions.alpha(0),
Actions.fadeIn(0.5f),
Actions.delay(25f),
Actions.fadeOut(0.5f)
));
+ disclaimer.setWrap(true);
stage.addActor(whiteSquare);
stage.addActor(infoLabel);
stage.addActor(dev);
+ stage.addActor(org);
+ stage.addActor(disclaimer);
Gdx.input.setInputProcessor(new InputMultiplexer(this, stage));
}
@Override public void show() {
- introMusic.setVolume(game.prefs.getFloat("music", 1.0f));
+ introMusic.setVolume(game.prefs.getFloat("music", 0.5f));
introMusic.play();
render(Gdx.graphics.getDeltaTime());
}