organized file structure, cleaned up
This commit is contained in:
@@ -13,10 +13,10 @@ import com.badlogic.gdx.utils.viewport.ScreenViewport;
|
||||
|
||||
import zero1hd.polyjet.Polyjet;
|
||||
import zero1hd.polyjet.TransitionAdapter;
|
||||
import zero1hd.polyjet.ui.CreditsPage;
|
||||
import zero1hd.polyjet.ui.MainPage;
|
||||
import zero1hd.polyjet.ui.MoreOptionsPage;
|
||||
import zero1hd.polyjet.ui.OptionsPage;
|
||||
import zero1hd.polyjet.ui.pages.CreditsPage;
|
||||
import zero1hd.polyjet.ui.pages.MainPage;
|
||||
import zero1hd.polyjet.ui.pages.MoreOptionsPage;
|
||||
import zero1hd.polyjet.ui.pages.OptionsPage;
|
||||
|
||||
|
||||
|
||||
|
@@ -17,11 +17,10 @@ import zero1hd.polyjet.TransitionAdapter;
|
||||
import zero1hd.polyjet.audio.AudioAnalyzer;
|
||||
import zero1hd.polyjet.audio.WavAudioData;
|
||||
import zero1hd.polyjet.maps.RhythmMap;
|
||||
import zero1hd.polyjet.ui.MusicSelectionPage;
|
||||
import zero1hd.polyjet.ui.pages.MusicSelectionPage;
|
||||
|
||||
|
||||
public class PreGameScreen extends ScreenAdapter implements TransitionAdapter {
|
||||
byte phase = 0;
|
||||
Polyjet core;
|
||||
Stage stage;
|
||||
Label statusText;
|
||||
@@ -85,49 +84,6 @@ public class PreGameScreen extends ScreenAdapter implements TransitionAdapter {
|
||||
stage.getViewport().apply();
|
||||
stage.act();
|
||||
stage.draw();
|
||||
switch (phase) {
|
||||
case 1:
|
||||
if (stage.getCamera().position.x != cameraTarget.x) {
|
||||
stage.getCamera().position.lerp(cameraTarget, 0.25f);
|
||||
}
|
||||
if (analyzer.containsData()) {
|
||||
phase++;
|
||||
statusText.setText("Mapping beats");
|
||||
//TODO MAP GENERATION
|
||||
}
|
||||
break;
|
||||
case 2:
|
||||
//finish map generation
|
||||
if (true) {
|
||||
statusText.setText("Loading assets");
|
||||
statusText.setPosition(1.5f*Gdx.graphics.getWidth(), (Gdx.graphics.getHeight()-statusText.getHeight())/2);
|
||||
|
||||
//list of assets needed for game screen exclusively
|
||||
Gdx.app.debug("PreGameScreen Phase", String.valueOf(phase));
|
||||
phase++;
|
||||
}
|
||||
break;
|
||||
case 3:
|
||||
//Resource loading...
|
||||
if (core.assetManager.update()) {
|
||||
Gdx.app.debug("PreGameScreen Phase", String.valueOf(phase));
|
||||
phase++;
|
||||
Gdx.app.debug("PreGameScreen Phase", String.valueOf(phase));
|
||||
cameraTarget.x = 2.5f*Gdx.graphics.getWidth();
|
||||
}
|
||||
break;
|
||||
case 4:
|
||||
if (stage.getCamera().position.x != cameraTarget.x) {
|
||||
stage.getCamera().position.lerp(cameraTarget, 0.25f);
|
||||
}
|
||||
|
||||
if (lastStatement == null) {
|
||||
lastStatement = new Label("Are you ready?", core.defaultSkin);
|
||||
lastStatement.setPosition(2.5f*Gdx.graphics.getWidth()-lastStatement.getWidth()/2, (Gdx.graphics.getHeight()-lastStatement.getHeight())/2);
|
||||
stage.addActor(lastStatement);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
super.render(delta);
|
||||
}
|
||||
|
Reference in New Issue
Block a user