diff options
author | Phillip <pacardon@u.washington.edu> | 2011-03-14 17:06:12 +0000 |
---|---|---|
committer | Phillip <pacardon@u.washington.edu> | 2011-03-14 17:06:12 +0000 |
commit | fc967a54d875b57599c87e8f6fef520f13b5cb9a (patch) | |
tree | 3e4e4dc70f4e77d454b43820ec790b53b29576a2 /src/tesseract/objects/tank/Tank.java | |
parent | 3c7fbd589bb5625395c63ce8c1e896b7380f9ccf (diff) |
added code to allow for gun emitter.
Diffstat (limited to 'src/tesseract/objects/tank/Tank.java')
-rw-r--r-- | src/tesseract/objects/tank/Tank.java | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/src/tesseract/objects/tank/Tank.java b/src/tesseract/objects/tank/Tank.java index f487ba5..d9975b3 100644 --- a/src/tesseract/objects/tank/Tank.java +++ b/src/tesseract/objects/tank/Tank.java @@ -8,6 +8,7 @@ import javax.media.j3d.TransformGroup; import javax.vecmath.Point3f;
import javax.vecmath.Vector3f;
+import tesseract.World;
import tesseract.objects.remote.RemoteObject;
public class Tank extends RemoteObject {
@@ -26,19 +27,22 @@ public class Tank extends RemoteObject { private static final int maxBarrelElevation = 14;
private static final int minBarrelElevation = -1;
- public Tank(Vector3f thePosition, float mass) {
- this(thePosition, mass, DEFAULT_SCALE);
+ public Tank(final Vector3f thePosition, final float mass,
+ final World theWorld) {
+ this(thePosition, mass, DEFAULT_SCALE, theWorld);
}
- public Tank(Vector3f thePosition, float mass, float theScale) {
+ public Tank(final Vector3f thePosition, final float mass,
+ final float theScale, final World theWorld) {
this(thePosition, mass, theScale, DEFAULT_BODY_COLOR,
- DEFAULT_TRACK_COLOR, DEFAULT_TURRET_COLOR);
+ DEFAULT_TRACK_COLOR, DEFAULT_TURRET_COLOR, theWorld);
}
- public Tank(Vector3f thePosition, float mass, float theScale,
- Color bodyColor, Color trackColor, Color turretColor) {
+ public Tank(final Vector3f thePosition, final float mass,
+ final float theScale, final Color bodyColor, final Color trackColor,
+ final Color turretColor, final World theWorld) {
super (thePosition, mass);
- tank = new Body(trackColor, bodyColor, theScale, turretColor);
+ tank = new Body(trackColor, bodyColor, theScale, turretColor, theWorld);
//orientation = new Vector3f();
aim = new Vector3f();
gunLocation = new Point3f();
|