Пример #1
0
 @Override
 public void addBehavior(final IStatement c) {
   if (c instanceof WeightedTaskStatement) {
     tasks.add((WeightedTaskStatement) c);
   } else {
     super.addBehavior(c);
   }
 }
Пример #2
0
 @Override
 public Object executeOn(final IScope scope) throws GamaRuntimeException {
   // We let inits, reflexes run
   super.executeOn(scope);
   WeightedTaskStatement active = chooseTask(scope);
   if (active != null) {
     return active.executeOn(scope);
   }
   return null;
 }
Пример #3
0
 @Override
 protected void clearBehaviors() {
   super.clearBehaviors();
   tasks.clear();
 }