Skip to content

Commit

Permalink
Added scene change transition using Scene2d - to be implemented in ot…
Browse files Browse the repository at this point in the history
…her screen later
  • Loading branch information
basimkhajwal committed May 29, 2016
1 parent 9534140 commit bed8726
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions core/src/net/net63/codearcade/LSD/screens/MenuScreen.java
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
import com.badlogic.gdx.math.Vector3;
import com.badlogic.gdx.scenes.scene2d.InputEvent;
import com.badlogic.gdx.scenes.scene2d.Stage;
import com.badlogic.gdx.scenes.scene2d.actions.Actions;
import com.badlogic.gdx.scenes.scene2d.ui.ImageButton;
import com.badlogic.gdx.scenes.scene2d.ui.Label;
import com.badlogic.gdx.scenes.scene2d.utils.ClickListener;
Expand Down Expand Up @@ -143,8 +144,15 @@ public void render(float delta) {

//If the button has been clicked start the game
if (playClicked) {
dispose();
game.setScreen(new PackSelectScreen(game));
playClicked = false;

centreGUI.getStage().addAction(Actions.sequence(Actions.moveTo(-centreGUI.getStage().getWidth(),0,0.2f), Actions.run(new Runnable() {
@Override
public void run() {
MenuScreen.this.dispose();
game.setScreen(new PackSelectScreen(game));
}
})));
}

//If the settings button was clicked go to the settings screen
Expand Down

0 comments on commit bed8726

Please sign in to comment.