fixed buck

This commit is contained in:
Benjamin Feyer
2024-12-11 20:19:15 +01:00
parent 61e168cefb
commit 06dcc4c0e4

View File

@@ -35,7 +35,7 @@ public ShellAnimation(TankTopControl tankTopControl, MdgaApp app, Runnable actio
protected void initSpatial() {
tankTopControl.rotate(spatial.getLocalTranslation(), this::shoot);
app.getAcousticHandler().playSound(MdgaSound.TURRET_ROTATE);
app.getRootNode().attachChild(createShell());
//app.getRootNode().attachChild(createShell());
}
private Vector3f getShootPos() {
@@ -110,12 +110,7 @@ private void hitExplosion() {
new ColorRGBA(1f, 0.8f, 0.4f, 0.5f),
new ColorRGBA(1f, 0f, 0f, 0f)
);
new Timer().schedule(new TimerTask() {
@Override
public void run() {
action();
}
}, 800);
app.getTimerManager().addTask(0.8f, super::action);
}
private void createEffect(Vector3f shootPos,
@@ -158,4 +153,4 @@ public void run() {
}
}, 1000);
}
}
}