Changeset View
Changeset View
Standalone View
Standalone View
binaries/data/mods/public/simulation/ai/common-api/shared.js
Show First 20 Lines • Show All 46 Lines • ▼ Show 20 Lines | m.SharedScript.prototype.Deserialize = function(data) | ||||
this._entityMetadata = data.metadata; | this._entityMetadata = data.metadata; | ||||
this.isDeserialized = true; | this.isDeserialized = true; | ||||
}; | }; | ||||
m.SharedScript.prototype.GetTemplate = function(name) | m.SharedScript.prototype.GetTemplate = function(name) | ||||
{ | { | ||||
if (this._templates[name] === undefined) | if (this._templates[name] === undefined) | ||||
this._templates[name] = Engine.GetTemplate(name) || null; | this._templates[name] = SimEngine.GetTemplate(name) || null; | ||||
return this._templates[name]; | return this._templates[name]; | ||||
}; | }; | ||||
/** | /** | ||||
* Initialize the shared component. | * Initialize the shared component. | ||||
* We need to know the initial state of the game for this, as we will use it. | * We need to know the initial state of the game for this, as we will use it. | ||||
* This is called right at the end of the map generation. | * This is called right at the end of the map generation. | ||||
▲ Show 20 Lines • Show All 398 Lines • Show Last 20 Lines |
Wildfire Games · Phabricator