/** 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();
 }