瀏覽代碼

Made LEDs clickable... (kind of...)

hutattedonmyarm 12 年之前
父節點
當前提交
f60789d972
共有 1 個檔案被更改,包括 1 行新增1 行删除
  1. 1
    1
      CubeControl/Led3D.java

+ 1
- 1
CubeControl/Led3D.java 查看文件

@@ -179,7 +179,7 @@ public class Led3D extends MouseAdapter {
179 179
 			Primitive p = (Primitive)result.getNode(PickResult.PRIMITIVE);
180 180
 			if (p != null) {
181 181
 				// p is now a Primitive that the user clicked
182
-				if (p.getClass().getName().equals("com.sun.j3d.utils.geometry.Cylinder")) {
182
+				if (p.getClass().getName().equals("com.sun.j3d.utils.geometry.Sphere")) {
183 183
 					// p is a Cylinder. Our LEDs are Spheres, so p.equals(led[x][y][z]) does not find anything...
184 184
 					for (int x = 0; x < 8; x++) {
185 185
 						for (int y = 0; y < 8; y++) {

Loading…
取消
儲存