Android Open Source - BlastWords Splash Screen






From Project

Back to project page BlastWords.

License

The source code is released under:

Apache License

If you think the Android project BlastWords listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

/**
 * BlastWords//from w  w  w . j  a v a 2 s.  c o  m
 * SplashScreen.java
 * 
 * Created by Lou Foster
 * Copyright Studio332 2013. All rights reserved.
 */
package com.studio332.blastwords.screens;

import static com.badlogic.gdx.scenes.scene2d.actions.Actions.delay;
import static com.badlogic.gdx.scenes.scene2d.actions.Actions.fadeIn;
import static com.badlogic.gdx.scenes.scene2d.actions.Actions.fadeOut;
import static com.badlogic.gdx.scenes.scene2d.actions.Actions.sequence;

import com.badlogic.gdx.scenes.scene2d.Action;
import com.badlogic.gdx.scenes.scene2d.Group;
import com.studio332.blastwords.BlastWords;
import com.studio332.blastwords.util.Assets;
import com.studio332.blastwords.util.SoundManager;

public class SplashScreen extends AbstractScreen {
   
   public SplashScreen(BlastWords game) {
      super(game);
   }
   
   @Override
   public void show() {
      super.show();

      // load the splash image and create the texture region
      final Group splashGrp = Assets.instance().makeFullscreenImg("splash");
      splashGrp.getColor().a = 0f;
      this.stage.addActor(splashGrp);

      // configure the fade-in/out effect on the splash image
      Action actions = sequence(fadeIn(0.75f),
            delay(4.0f, fadeOut(0.25f)), 
            new Action() {
               @Override
               public boolean act(float delta) {
                  SoundManager.instance().playSound( SoundManager.PAGE_TURN );
                  SplashScreen.this.game.showMainMenu();
                  return true;
               }
               
            });

      splashGrp.addAction(actions);
   }
}




Java Source Code List

com.studio332.blastwords.BlastWords.java
com.studio332.blastwords.MainActivity.java
com.studio332.blastwords.Main.java
com.studio332.blastwords.model.BlastWordsGame.java
com.studio332.blastwords.model.LetterInfo.java
com.studio332.blastwords.model.Settings.java
com.studio332.blastwords.objects.Blaster.java
com.studio332.blastwords.objects.Bomb.java
com.studio332.blastwords.objects.Digit.java
com.studio332.blastwords.objects.GameTimer.java
com.studio332.blastwords.objects.ScoreBoard.java
com.studio332.blastwords.objects.Tile.java
com.studio332.blastwords.screens.AbstractScreen.java
com.studio332.blastwords.screens.GameOver.java
com.studio332.blastwords.screens.GameScreen.java
com.studio332.blastwords.screens.GameStateListener.java
com.studio332.blastwords.screens.MainMenuScreen.java
com.studio332.blastwords.screens.Popup.java
com.studio332.blastwords.screens.SplashScreen.java
com.studio332.blastwords.util.Assets.java
com.studio332.blastwords.util.BlastWordsActions.java
com.studio332.blastwords.util.Overlay.java
com.studio332.blastwords.util.ParticleEffectActor.java
com.studio332.blastwords.util.SoundManager.java