1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54
| for (int i = 0; i < floorCubes; i++) { floorBoxes.add(new Box(Vector3f.ZERO, new Vector3f(floorCubeWidth, floorCubeHeight, floorCubeDepth))); floorGeoms.add(new Geometry("Box " + i, floorBoxes.get(i))); floorGeoms.get(i).setMaterial(floorMaterial); floorNode.attachChild(floorGeoms.get(i)); if (i < 25) { floorGeoms.get(i).setLocalTranslation(i, 0, 0); } else if (i > 24 && i < 50) { floorGeoms.get(i).setLocalTranslation(x1++, 0, -floorCubeDepth); } else if (i > 49 && i < 75) { floorGeoms.get(i).setLocalTranslation(x2++, 0, -floorCubeDepth * 2); } else if (i > 74 && i < 100) { floorGeoms.get(i).setLocalTranslation(x3++, 0, -floorCubeDepth * 3); } else if (i > 99 && i < 125) { floorGeoms.get(i).setLocalTranslation(x4++, 0, -floorCubeDepth * 4); } else if (i > 124 && i < 150) { floorGeoms.get(i).setLocalTranslation(x5++, 0, -floorCubeDepth * 5); } else if (i > 149 && i < 175) { floorGeoms.get(i).setLocalTranslation(x6++, 0, -floorCubeDepth * 6); } else if (i > 174 && i < 200) { floorGeoms.get(i).setLocalTranslation(x7++, 0, -floorCubeDepth * 7); } else if (i > 199 && i < 225) { floorGeoms.get(i).setLocalTranslation(x8++, 0, -floorCubeDepth * 8); } else if (i > 224 && i < 250) { floorGeoms.get(i).setLocalTranslation(x9++, 0, -floorCubeDepth * 9); } else if (i > 249 && i < 275) { floorGeoms.get(i).setLocalTranslation(x10++, 0, -floorCubeDepth * 10); } else if (i > 274 && i < 300) { floorGeoms.get(i).setLocalTranslation(x11++, 0, -floorCubeDepth * 11); } else if (i > 299 && i < 325) { floorGeoms.get(i).setLocalTranslation(x12++, 0, -floorCubeDepth * 12); } else if (i > 324 && i < 350) { floorGeoms.get(i).setLocalTranslation(x13++, 0, -floorCubeDepth * 13); } else if (i > 349 && i < 375) { floorGeoms.get(i).setLocalTranslation(x14++, 0, -floorCubeDepth * 14); } else if (i > 374 && i < 400) { floorGeoms.get(i).setLocalTranslation(x15++, 0, -floorCubeDepth * 15); } else if (i > 399 && i < 425) { floorGeoms.get(i).setLocalTranslation(x16++, 0, -floorCubeDepth * 16); } else if (i > 424 && i < 450) { floorGeoms.get(i).setLocalTranslation(x17++, 0, -floorCubeDepth * 17); } else if (i > 449 && i < 475) { floorGeoms.get(i).setLocalTranslation(x18++, 0, -floorCubeDepth * 18); } else if (i > 474 && i < 500) { floorGeoms.get(i).setLocalTranslation(x19++, 0, -floorCubeDepth * 19); } } |