Changeset View
Changeset View
Standalone View
Standalone View
ps/trunk/binaries/data/mods/public/simulation/components/Mirage.js
Show All 18 Lines | Mirage.prototype.Init = function() | ||||
this.numBuilders = 0; | this.numBuilders = 0; | ||||
this.buildTime = {}; | this.buildTime = {}; | ||||
this.maxHitpoints = null; | this.maxHitpoints = null; | ||||
this.hitpoints = null; | this.hitpoints = null; | ||||
this.repairable = null; | this.repairable = null; | ||||
this.unhealable = null; | this.unhealable = null; | ||||
this.IsInjured = null; | |||||
this.capturePoints = []; | this.capturePoints = []; | ||||
this.maxCapturePoints = 0; | this.maxCapturePoints = 0; | ||||
this.maxAmount = null; | this.maxAmount = null; | ||||
this.amount = null; | this.amount = null; | ||||
this.type = null; | this.type = null; | ||||
this.isInfinite = null; | this.isInfinite = null; | ||||
▲ Show 20 Lines • Show All 64 Lines • ▼ Show 20 Lines | |||||
// Health data | // Health data | ||||
Mirage.prototype.CopyHealth = function(cmpHealth) | Mirage.prototype.CopyHealth = function(cmpHealth) | ||||
{ | { | ||||
this.miragedIids.add(IID_Health); | this.miragedIids.add(IID_Health); | ||||
this.maxHitpoints = cmpHealth.GetMaxHitpoints(); | this.maxHitpoints = cmpHealth.GetMaxHitpoints(); | ||||
this.hitpoints = cmpHealth.GetHitpoints(); | this.hitpoints = cmpHealth.GetHitpoints(); | ||||
this.repairable = cmpHealth.IsRepairable(); | this.repairable = cmpHealth.IsRepairable(); | ||||
this.injured = cmpHealth.IsInjured(); | |||||
this.unhealable = cmpHealth.IsUnhealable(); | this.unhealable = cmpHealth.IsUnhealable(); | ||||
}; | }; | ||||
Mirage.prototype.GetMaxHitpoints = function() { return this.maxHitpoints; }; | Mirage.prototype.GetMaxHitpoints = function() { return this.maxHitpoints; }; | ||||
Mirage.prototype.GetHitpoints = function() { return this.hitpoints; }; | Mirage.prototype.GetHitpoints = function() { return this.hitpoints; }; | ||||
Mirage.prototype.IsRepairable = function() { return this.repairable; }; | Mirage.prototype.IsRepairable = function() { return this.repairable; }; | ||||
Mirage.prototype.IsInjured = function() { return this.injured; }; | |||||
Mirage.prototype.IsUnhealable = function() { return this.unhealable; }; | Mirage.prototype.IsUnhealable = function() { return this.unhealable; }; | ||||
// Capture data | // Capture data | ||||
Mirage.prototype.CopyCapturable = function(cmpCapturable) | Mirage.prototype.CopyCapturable = function(cmpCapturable) | ||||
{ | { | ||||
this.miragedIids.add(IID_Capturable); | this.miragedIids.add(IID_Capturable); | ||||
this.capturePoints = clone(cmpCapturable.GetCapturePoints()); | this.capturePoints = clone(cmpCapturable.GetCapturePoints()); | ||||
▲ Show 20 Lines • Show All 104 Lines • Show Last 20 Lines |
Wildfire Games · Phabricator