Пример #1
0
 @Override
 public void reloadScene(String s) {
   loading = true;
   SpaceScene scene = scenes.get(s);
   scene.reset();
   scene.start();
   loading = false;
 }
Пример #2
0
 @Override
 public void dispose() {
   Iterator<SpaceScene> appIter = scenes.values();
   while (appIter.hasNext()) {
     SpaceScene app = appIter.next();
     app.dispose();
   }
 }
Пример #3
0
 @Override
 public void resize(int width, int height) {
   Iterator<SpaceScene> appIter = scenes.values();
   while (appIter.hasNext()) {
     SpaceScene app = appIter.next();
     app.resize(width, height);
   }
 }
Пример #4
0
 @Override
 public void create() {
   Iterator<SpaceScene> appIter = scenes.values();
   while (appIter.hasNext()) {
     SpaceScene app = appIter.next();
     app.create();
   }
   reloadScene("main menu");
   switchScene("main menu");
 }
Пример #5
0
 @Override
 public void switchScene(String s) {
   // if (currentApp != null)
   // {
   //	currentApp.pause();
   // }
   Gdx.app.log("switched scene to", s);
   currentApp = scenes.get(s);
   Gdx.input.setInputProcessor(currentApp.getInputProcessor());
 }
Пример #6
0
 @Override
 public void resume() {
   currentApp.resume();
 }
Пример #7
0
 @Override
 public void pause() {
   currentApp.pause();
 }
Пример #8
0
 @Override
 public void render() {
   if (!loading) currentApp.render();
 }