new Perception(name, dataType)
Creates a new Perception object
Parameters:
Name | Type | Description |
---|---|---|
name |
string | Name of the perception object. Should be human descriptive of the type of type of perception being performed. |
dataType |
function | A constructure for the type of data that will be emitted by this Perception object. |
Extends
Members
-
static eventBus
-
the perception event bus, for communicating between perception Components
Methods
-
input(data) → {boolean}
-
A perception input event. Data must be of the
dataType
specified in the constructor.Parameters:
Name Type Description data
* The data that has been perceived
Returns:
boolean -Returns
true
if the event had listeners,false
otherwise -
sendEvent(type, data)
-
Emits an event using the specified eventClass
Parameters:
Name Type Description type
string The event type to emit
data
* The data to emit
- Overrides: