Statechart Animation Emitter
class StatechartAnimationEmitter(agentName: String, model: Model) : AgentModel.StatechartObserver(source)
An AgentModel.StatechartObserver that emits agent statechart events: AnimationEvent.AgentStateEntered, AnimationEvent.AgentStateExited, and AnimationEvent.AgentTransition. Attach one per agent to that agent's statechart (agent.statechart?.addObserver(StatechartAnimationEmitter(agent.name, model))).
Because the statechart callbacks carry only the state name and time (not the agent), each instance is bound to a single agentName.
Parameters
agent Name
the name of the agent whose statechart this observes
model
the run-wide model, for its animation sink