コード例 #1
0
  public void preIntroSetup() {
    try {

      int bgWidth = env.bgImg.getWidth(env);
      int bgHeight = env.bgImg.getHeight(env);
      int[] bgPixels = new int[bgWidth * bgHeight];
      for (int i = 0; i < bgPixels.length; i++) if (bgPixels[i] != 0) System.out.print(bgPixels[i]);
      overlay = new PImage(bgWidth, bgHeight);
      overlay.format = ARGB;
      overlay.pixels = bgPixels;
      runNum = 0;
      controls.setEnabled(false);

      /** * get into looping */
      afterFirstStreaming = true;
      /** overview shut */
      draw();
      /*theCamera.moveToNow(new FVector(0.0f, 0.0f, 1000));
      theCamera.lookAtNow(new FVector(0.0f, 1.0f, 0));
      */
      draw();
      ortho(-1500, 800, -800, 800, 1000, 2000);
      loadPixels();
      noStroke();
      getOverviewShut();
      afterOverviewShot = true;
      draw();
      loop();

      /** give the environment the hint to swop the surfaces */
      env.addThem();
      /** * intro */
      theCamera.moveToNow(new FVector(-200.0f, 950.0f, 1000));
      theCamera.lookAtNow(new FVector(-200.51917f, 851.8057f, 0));
      theCamera.lookAtInter(
          new FVector(1341.8213f, 757.865f, 0), new Integer(4000), new Integer(3));
      Object[] actionObjects = {new FVector(0, 0, -88), new Integer(2000), new Integer(0)};
      theCamera.queueAction("lookAtInter", 4000, actionObjects);
      theCamera.moveToNow(new FVector(-500.51917f, 951.8057f, 200));
      theCamera.moveToInter(
          new FVector(1341.8213f, 857.865f, 200), new Integer(4000), new Integer(3));
      Object[] actionObjects2 = {
        new FVector(0, 800, Camera.maxCameraHeight), new Integer(2000), new Integer(1)
      };
      theCamera.queueAction("moveToInter", 0, actionObjects2);
      Object[] actionObjects3 = {Boolean.valueOf(true)};
      theCamera.queueAction("setControlsEnabled", 3500, actionObjects3);
    } catch (Exception e) {
      e.printStackTrace();
      env.setErrorDisplay(
          "Das Applet konnte nicht gestartet werden. Eventuell ist dies ein Speicherproblem. Bitte stoppen sie alle anderen Java-Anwendungen. GGf. muss der Browser neu gestartet werden um den Cache zu leeren.");
    }
  }
コード例 #2
0
  /** Global entrance/exit into/from detailview */
  public void setTouring(boolean p_touring, Building selectedBuilding_p) {
    selectedBuilding = selectedBuilding_p;
    controls.setEnabled(!p_touring);
    SlideCase.setActive(!p_touring);

    touring = p_touring;
    ropeSlideIndex = 0;
    if (touring) {
      Environment.contentHolder.setBorder(new LineBorder(Environment.fh_CI_Color, 3));
      hideSlideCases();
    } else {
      theCamera.setInstantCircleView(Boolean.valueOf(false));
      theCamera.setLastCircleViewBuilding(null);
      Object[] actionObjects = {};
      theCamera.queueAction("resetBuildings", 1000, actionObjects);
      theCamera.guaranteeMinInteractiveCameraHeight();

      Environment.contentHolder.setBorder(Environment.grayline);
    }
  }