BehaviorManager()

BehaviorManager keeps a map of BehaviorName:EventManager which is used during Item and NPC hydrate() methods to attach events

new BehaviorManager()

Methods

addListener(behaviorName, listener)

Parameters:
Name Type Description
behaviorName string
listener function

get(name) → {EventManager}

Get EventManager for a given behavior

Parameters:
Name Type Description
name string
Returns:
EventManager

has(name) → {boolean}

Check to see if a behavior exists

Parameters:
Name Type Description
name string
Returns:
boolean