From 65812af57a86bef6bfc82bf538a7a2de27eecfc5 Mon Sep 17 00:00:00 2001 From: Phillip Date: Tue, 15 Mar 2011 23:29:59 +0000 Subject: Added failsafe remove in CollidableObject and World classes. Increased the mass of the tank in TankMenuItem ModifyableParticle now spawns 20 DyingParticles when it collides with something. New Class DyingParticle, particle with a duration of 6 ticks. --- src/common/CollidableObject.java | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/common/CollidableObject.java') diff --git a/src/common/CollidableObject.java b/src/common/CollidableObject.java index 0549335..2174e15 100644 --- a/src/common/CollidableObject.java +++ b/src/common/CollidableObject.java @@ -15,6 +15,7 @@ import com.sun.j3d.utils.geometry.Primitive; public abstract class CollidableObject implements Serializable { private static final long serialVersionUID = 3667108226485766929L; protected float inverseMass; + protected boolean detachMe = false; // The center of mass in the local coordinate system protected Vector3f centerOfMass; protected Vector3f position, previousPosition; @@ -110,6 +111,7 @@ public abstract class CollidableObject implements Serializable { public void detach() { BG.detach(); + detachMe = true; } public void updateState(float duration) { @@ -596,4 +598,9 @@ public abstract class CollidableObject implements Serializable { } return appearance; } + + public boolean removeMe() { + // TODO Auto-generated method stub + return detachMe; + } } -- cgit v1.2.3