Version 1.0 #40

Merged
j23f0779 merged 947 commits from development2 into main 2024-12-13 10:26:49 +01:00
2 changed files with 11 additions and 7 deletions
Showing only changes of commit 50f0cdfce6 - Show all commits

View File

@@ -21,6 +21,8 @@ public class MatrixAnimation extends ActionControl {
private List<ParticleEmitter> activeEmitter = new ArrayList<>();
private ParticleEmitter radarEmitter = null;
private float timeElapsed = 0f;
private final TimerManager timerManager = new TimerManager();
private enum MatrixState{
RADAR_ON,
@@ -30,6 +32,7 @@ private enum MatrixState{
}
private MatrixState state;
public MatrixAnimation(MdgaApp app, Vector3f radarPos, Runnable runnable){
super(runnable);
this.app = app;
@@ -50,18 +53,18 @@ protected void controlUpdate(float tpf) {
timeElapsed += tpf;
switch(state){
case RADAR_ON -> {
if(timeElapsed >= 2f){
state = MatrixState.RADAR_OFF;
timeElapsed = 0;
radarEmitter.setParticlesPerSec(0);
new Timer().schedule(new TimerTask() {
@Override
public void run() {
timerManager.addTask(3f, () -> app.enqueue(() -> {
app.getRootNode().detachChild(radarEmitter);
}
}, 3000);
return null;
}));
}
}
case RADAR_OFF -> {
@@ -95,6 +98,7 @@ public void run() {
}
}
}
timerManager.update(tpf);
}
private void turnOff(){

View File

@@ -87,7 +87,7 @@ public Game() {
gameStatistics = new Statistic();
initializeDrawPile();
board = new Board();
die = new Die(1,2,3,4,
die = new Die(1,2,
5, 1,1,1
);
}