Changeset View
Changeset View
Standalone View
Standalone View
binaries/data/mods/public/simulation/components/Resistance.js
Show First 20 Lines • Show All 70 Lines • ▼ Show 20 Lines | Resistance.prototype.Schema = | ||||
"</zeroOrMore>"; | "</zeroOrMore>"; | ||||
Resistance.prototype.Init = function() | Resistance.prototype.Init = function() | ||||
{ | { | ||||
this.invulnerable = false; | this.invulnerable = false; | ||||
this.attackers = new Set(); | this.attackers = new Set(); | ||||
}; | }; | ||||
Resistance.prototype.Update = function(newTemplate) | |||||
{ | |||||
this.template = newTemplate; | |||||
}; | |||||
Resistance.prototype.IsInvulnerable = function() | Resistance.prototype.IsInvulnerable = function() | ||||
{ | { | ||||
return this.invulnerable; | return this.invulnerable; | ||||
}; | }; | ||||
/** | /** | ||||
* @param {number} attacker - The entity ID of the attacker to add. | * @param {number} attacker - The entity ID of the attacker to add. | ||||
* @return {boolean} - Whether the attacker was added sucessfully. | * @return {boolean} - Whether the attacker was added sucessfully. | ||||
▲ Show 20 Lines • Show All 138 Lines • Show Last 20 Lines |
Wildfire Games · Phabricator