Boids Beispiel angepasst und Bug bei Null-Entfernung behoben

This commit is contained in:
ngb
2022-06-30 21:24:10 +02:00
parent 445bc29480
commit 1b5f46c771
3 changed files with 37 additions and 3 deletions

View File

@@ -28,7 +28,7 @@ public abstract class Creature extends Constants {
public abstract void update( List<Creature> creatures );
protected void limitPosition() {
public void limitPosition() {
if( position.x < 0 ) {
if( Boids.BORDER_WRAP ) {
position.x = width;