detonate(vector);
}
@Override
public void detonate(Ray vector) {
final Teapot teapot = new Teapot("killer teapot");
TankGame.GAME.lock();
TankGame.GAMESTATE.getRoot().attachChild(teapot);
teapot.updateRenderState();
teapot.setModelBound(new BoundingBox());
teapot.updateModelBound();
teapot.updateWorldBound();
teapot.setLocalTranslation(vector.origin);
TankGame.GAME.unlock();
//remove teapot after 5 seconds
new Thread() {
public void run() {
try {
Thread.sleep(5*1000);
} catch (InterruptedException e) {}
TankGame.NETWORK.unregister(teapot);
TankGame.GAME.lock();
teapot.removeFromParent();
TankGame.GAME.unlock();
}
}.start();
try {