示例#1
0
 public void unpauseOverlay() {
   if (inOverlay) {
     paused = false;
     inOverlay = false;
     overlayMenu.clearChildren();
     inMux.removeProcessor(overlayStage);
     inMux.addProcessor(stage);
   }
 }
示例#2
0
 public void doMenu() {
   if (!inOverlay && !sheepGame.isLosing() && !sheepGame.isWinning()) {
     overlayMenu.clearChildren();
     inOverlay = true;
     paused = true;
     addResumeButton(overlayMenu);
     addRetryButtons(overlayMenu);
     inMux.addProcessor(overlayStage);
     inMux.removeProcessor(stage);
   }
 }
示例#3
0
  void changeTest(int behaviorIndex) {
    // Remove the old behavior and its window
    testsTable.clear();
    if (currentTest != null) {
      if (currentTest.getDetailWindow() != null) currentTest.getDetailWindow().remove();
      currentTest.dispose();
    }

    // Add the new behavior and its window
    currentTest = tests[behaviorIndex];
    Gdx.app.log("BehaviorTreeTests", "***********************************************");
    Gdx.app.log("BehaviorTreeTests", "Starting test " + currentTest.getClass().getSimpleName());
    Gdx.app.log("BehaviorTreeTests", "***********************************************");
    String description = currentTest.getDescription();
    if (description != null) {
      Gdx.app.log("BehaviorTreeTests", description);
      Gdx.app.log("BehaviorTreeTests", "***********************************************");
    }
    currentTest.create(testsTable);
    InputMultiplexer im = (InputMultiplexer) Gdx.input.getInputProcessor();
    if (im.size() > 1) im.removeProcessor(1);
    if (currentTest.getInputProcessor() != null) im.addProcessor(currentTest.getInputProcessor());
    if (currentTest.getDetailWindow() != null) stage.addActor(currentTest.getDetailWindow());
  }