mirror of
https://github.com/fazo96/AIrium.git
synced 2025-01-10 09:34:20 +01:00
bugfixes
This commit is contained in:
parent
e18cddebc7
commit
2e5a4ca26e
@ -67,9 +67,9 @@ public class Game extends ApplicationAdapter {
|
||||
@Override
|
||||
public boolean scrolled(int i) {
|
||||
if (i>0) {
|
||||
renderer.scale(0.5f, 0.5f, 1);
|
||||
renderer.scale(0.9f, 0.9f, 1);
|
||||
} else {
|
||||
renderer.scale(1.5f, 1.5f, 1);
|
||||
renderer.scale(1.1f, 1.1f, 1);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
@ -20,7 +20,7 @@ public class Creature extends Element implements Runnable {
|
||||
|
||||
private Brain brain;
|
||||
private float dir, hp, prevHp, speed, fitness, rotSpeed, beak;
|
||||
private boolean eating = false, killing = false, workerDone = false;
|
||||
private boolean eating = false, killing = false, workerDone = false, killWorker = false;
|
||||
private Sight[] sights;
|
||||
private Thread workerThread;
|
||||
|
||||
@ -54,6 +54,7 @@ public class Creature extends Element implements Runnable {
|
||||
update();
|
||||
workerDone = true;
|
||||
}
|
||||
if(killWorker) break;
|
||||
}
|
||||
}
|
||||
|
||||
@ -70,6 +71,7 @@ public class Creature extends Element implements Runnable {
|
||||
carcass.setDecayRate(corpseDecayRate);
|
||||
Game.get().getWorld().add(carcass);
|
||||
}
|
||||
killWorker = true;
|
||||
return;
|
||||
}
|
||||
if (speed > max_speed) {
|
||||
|
Loading…
Reference in New Issue
Block a user