コード例 #1
0
 public void prepareForNextBuildingDetail(FVector pos2Fly2AfterPrep_p, boolean showroom_p) {
   pos2Fly2AfterPrep = pos2Fly2AfterPrep_p;
   showroom = showroom_p;
   if (lastSelectedBuilding != selectedBuilding) {
     preparingForTouring = true;
     objectManager.resetBuildings();
     detailPreparingStep();
   } else readyPrepared();
 }
コード例 #2
0
 private void detailPreparingStep() {
   if (preparingIndex <= numStepsForPreparing) {
     float currAlpha = 1.0f - ((1.0f / numStepsForPreparing) * preparingIndex);
     System.out.println("Alpha=" + currAlpha);
     for (int i = 0; i < objectManager.worldObjects.size(); i++) {
       Object currObject = objectManager.worldObjects.elementAt(i);
       if (currObject instanceof Building && !currObject.equals(selectedBuilding)) {
         ((Building) (objectManager.worldObjects.elementAt(i))).setAlpha(currAlpha);
       }
     }
     preparingIndex++;
   } else {
     objectManager.makeBuildingsInvisible(selectedBuilding);
     preparingForTouring = false;
     preparingIndex = 0;
     readyPrepared();
   }
 }