cleaned up naming, changed way of memory management, continued work on music selection ui
This commit is contained in:
@@ -17,6 +17,7 @@ import zero1hd.polyjet.TransitionAdapter;
|
||||
import zero1hd.polyjet.audio.AudioAnalyzer;
|
||||
import zero1hd.polyjet.audio.WavAudioData;
|
||||
import zero1hd.polyjet.maps.RhythmMap;
|
||||
import zero1hd.polyjet.ui.MusicSelectionPage;
|
||||
|
||||
|
||||
public class PreGameScreen extends ScreenAdapter implements TransitionAdapter {
|
||||
@@ -32,6 +33,8 @@ public class PreGameScreen extends ScreenAdapter implements TransitionAdapter {
|
||||
|
||||
Label lastStatement;
|
||||
|
||||
MusicSelectionPage musicSelection;
|
||||
|
||||
public PreGameScreen(final Polyjet core) {
|
||||
this.core = core;
|
||||
analyzer = new AudioAnalyzer();
|
||||
@@ -42,13 +45,7 @@ public class PreGameScreen extends ScreenAdapter implements TransitionAdapter {
|
||||
stage.addListener(new ClickListener() {
|
||||
@Override
|
||||
public void clicked(InputEvent event, float x, float y) {
|
||||
if (phase == 4) {
|
||||
if (core.gameScreen != null) {
|
||||
core.setScreen(core.gameScreen);
|
||||
} else {
|
||||
core.setScreen((core.gameScreen = new GameScreen(core)));
|
||||
}
|
||||
}
|
||||
core.setScreen(new GameScreen(core));
|
||||
super.clicked(event, x, y);
|
||||
}
|
||||
});
|
||||
@@ -61,6 +58,8 @@ public class PreGameScreen extends ScreenAdapter implements TransitionAdapter {
|
||||
public void postTransition() {
|
||||
stage.clear();
|
||||
//draw music selector
|
||||
musicSelection = new MusicSelectionPage(core, core.defaultSkin);
|
||||
stage.addActor(musicSelection);
|
||||
|
||||
statusText = new Label(null, core.defaultSkin);
|
||||
statusText.setPosition(1.6f*Gdx.graphics.getWidth(), (Gdx.graphics.getHeight()-statusText.getHeight())/2);
|
||||
@@ -88,9 +87,6 @@ public class PreGameScreen extends ScreenAdapter implements TransitionAdapter {
|
||||
stage.act();
|
||||
stage.draw();
|
||||
switch (phase) {
|
||||
case 0:
|
||||
|
||||
break;
|
||||
case 1:
|
||||
if (stage.getCamera().position.x != cameraTarget.x) {
|
||||
stage.getCamera().position.lerp(cameraTarget, 0.25f);
|
||||
|
Reference in New Issue
Block a user