/// <summary>
 /// Constructor.
 /// </summary>
 /// <param name="name">The name of the BehaviorManager.</param>
 /// <param name="timer">The timer to use for updates.</param>
 /// <param name="eventManager">The event manager to process on updates.</param>
 public BehaviorManager(String name, UpdateTimer timer, EventManager eventManager)
 {
     this.eventManager = eventManager;
     this.timer        = timer;
     timer.addUpdateListener(this);
     this.name       = name;
     behaviorFactory = new BehaviorFactory(this);
 }
Beispiel #2
0
 public void execute()
 {
     try
     {
         action.Invoke();
     }
     catch (BehaviorBlacklistException bbe)
     {
         SimObjectErrorManager.AddError(BehaviorFactory.createError(bbe));
     }
     catch (Exception e)
     {
         behavior._unanticipatedBlacklistError(e);
         SimObjectErrorManager.AddError(BehaviorFactory.createError(behavior, e));
     }
 }