1
0
mirror of https://github.com/fazo96/AIrium.git synced 2025-01-10 09:34:20 +01:00
This commit is contained in:
Enrico Fasoli 2015-08-07 11:48:23 +02:00
parent e18cddebc7
commit 2e5a4ca26e
2 changed files with 5 additions and 3 deletions

View File

@ -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;
}

View File

@ -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) {