Changeset View
Changeset View
Standalone View
Standalone View
binaries/data/mods/public/simulation/components/Trigger.js
Show First 20 Lines • Show All 60 Lines • ▼ Show 20 Lines | |||||
Trigger.prototype.GetTriggerPoints = function(ref) | Trigger.prototype.GetTriggerPoints = function(ref) | ||||
{ | { | ||||
return this.triggerPoints[ref] || []; | return this.triggerPoints[ref] || []; | ||||
}; | }; | ||||
/** | /** | ||||
* Binds a function to the specified event. | * Binds a function to the specified event. | ||||
* | * | ||||
* @param {string} event - One of eventNames | * @param {string} event - One of eventNames prefixed with On | ||||
* @param {string} action - Name of a function available to this object | * @param {string} action - Name of a function available to this object | ||||
* @param {Object} data - f.e. enabled or not, delay for timers, range for range triggers | * @param {Object} data - f.e. enabled or not, delay for timers, range for range triggers | ||||
* | * | ||||
* @example | * @example | ||||
* data = { enabled: true, interval: 1000, delay: 500 } | * data = { enabled: true, interval: 1000, delay: 500 } | ||||
* | * | ||||
* Range trigger: | * Range trigger: | ||||
* data.entities = [id1, id2] * Ids of the source | * data.entities = [id1, id2] * Ids of the source | ||||
▲ Show 20 Lines • Show All 225 Lines • Show Last 20 Lines |
Wildfire Games · Phabricator