diff options
author | Phillip <pacardon@u.washington.edu> | 2011-03-14 17:05:58 +0000 |
---|---|---|
committer | Phillip <pacardon@u.washington.edu> | 2011-03-14 17:05:58 +0000 |
commit | 3c7fbd589bb5625395c63ce8c1e896b7380f9ccf (patch) | |
tree | 2206904fd0a5cffe2f095cdf8df7ff67cfbd45d3 | |
parent | 3f929048737241331715fbd2ab0db13d8f72b2e1 (diff) |
Added code to make emitter for gun possible.
-rw-r--r-- | src/tesseract/objects/remote/RemoteObjectMenu.java | 2 | ||||
-rw-r--r-- | src/tesseract/objects/remote/TankMenuItem.java | 8 |
2 files changed, 7 insertions, 3 deletions
diff --git a/src/tesseract/objects/remote/RemoteObjectMenu.java b/src/tesseract/objects/remote/RemoteObjectMenu.java index 3d4435e..606e9bb 100644 --- a/src/tesseract/objects/remote/RemoteObjectMenu.java +++ b/src/tesseract/objects/remote/RemoteObjectMenu.java @@ -27,7 +27,7 @@ public class RemoteObjectMenu extends JMenu { myControlledObjects = new ArrayList<RemoteObject>(); // Objects that can be added - add(new TankMenuItem(this)); + add(new TankMenuItem(this, theWorld)); // Separator addSeparator(); diff --git a/src/tesseract/objects/remote/TankMenuItem.java b/src/tesseract/objects/remote/TankMenuItem.java index 317c0fc..3cebb33 100644 --- a/src/tesseract/objects/remote/TankMenuItem.java +++ b/src/tesseract/objects/remote/TankMenuItem.java @@ -2,15 +2,19 @@ package tesseract.objects.remote; import javax.vecmath.Vector3f; +import tesseract.World; import tesseract.objects.tank.Tank; public class TankMenuItem extends RemoteObjectMenuItem { - public TankMenuItem(final RemoteObjectMenu theMenu) { + private final World myWorld; + + public TankMenuItem(final RemoteObjectMenu theMenu, World theWorld) { super("Tank", theMenu); + myWorld = theWorld; } @Override protected RemoteObject createRemoteObject() { - return new Tank(new Vector3f(), 1); + return new Tank(new Vector3f(), 1, myWorld); } } |