/** Delete an entity, and its brain if there is one. Do not ask directly this method. */
 public void delete() {
   // System.out.println("Actually deleting " + this);
   if (deleted) return;
   deleted = true;
   if (myBrain != null) {
     if (myBrain instanceof AbstractAgent)
       getStructure().getAgent().doKillAgent((AbstractAgent) myBrain);
     else myBrain.delete();
   }
   super.delete();
 }
예제 #2
0
 //////////////////////////////////////  SYSTEM METHODS
 public final void delete() {
   System.out.println("I'm dead !!! ");
   if (myBrain != null) myBrain.delete();
   super.delete();
 }