Changeset View
Changeset View
Standalone View
Standalone View
binaries/data/mods/public/simulation/components/Upgrade.js
Show First 20 Lines • Show All 49 Lines • ▼ Show 20 Lines | Upgrade.prototype.Schema = | ||||
"</oneOrMore>"; | "</oneOrMore>"; | ||||
Upgrade.prototype.Init = function() | Upgrade.prototype.Init = function() | ||||
{ | { | ||||
this.elapsedTime = 0; | this.elapsedTime = 0; | ||||
this.expendedResources = {}; | this.expendedResources = {}; | ||||
}; | }; | ||||
Upgrade.prototype.Update = function(newTemplate) { | |||||
warn("Upgrade.Update() is not implemented"); | |||||
}; | |||||
// This will also deal with the "OnDestroy" case. | // This will also deal with the "OnDestroy" case. | ||||
Upgrade.prototype.OnOwnershipChanged = function(msg) | Upgrade.prototype.OnOwnershipChanged = function(msg) | ||||
{ | { | ||||
if (!this.completed) | if (!this.completed) | ||||
this.CancelUpgrade(msg.from); | this.CancelUpgrade(msg.from); | ||||
if (msg.to != INVALID_PLAYER) | if (msg.to != INVALID_PLAYER) | ||||
{ | { | ||||
▲ Show 20 Lines • Show All 299 Lines • Show Last 20 Lines |
Wildfire Games · Phabricator