Changeset View
Changeset View
Standalone View
Standalone View
binaries/data/mods/public/simulation/components/Promotion.js
Show All 13 Lines | Promotion.prototype.Schema = | ||||
"</element>"; | "</element>"; | ||||
Promotion.prototype.Init = function() | Promotion.prototype.Init = function() | ||||
{ | { | ||||
this.currentXp = 0; | this.currentXp = 0; | ||||
this.ComputeTrickleRate(); | this.ComputeTrickleRate(); | ||||
}; | }; | ||||
Promotion.prototype.Update = function(newTemplate) | |||||
{ | |||||
this.template = newTemplate; | |||||
this.ComputeTrickleRate(); | |||||
this.IncreaseXp(0); | |||||
}; | |||||
Promotion.prototype.GetRequiredXp = function() | Promotion.prototype.GetRequiredXp = function() | ||||
{ | { | ||||
return ApplyValueModificationsToEntity("Promotion/RequiredXp", +this.template.RequiredXp, this.entity); | return ApplyValueModificationsToEntity("Promotion/RequiredXp", +this.template.RequiredXp, this.entity); | ||||
}; | }; | ||||
Promotion.prototype.GetCurrentXp = function() | Promotion.prototype.GetCurrentXp = function() | ||||
{ | { | ||||
return this.currentXp; | return this.currentXp; | ||||
▲ Show 20 Lines • Show All 112 Lines • Show Last 20 Lines |
Wildfire Games · Phabricator