Changeset View
Changeset View
Standalone View
Standalone View
binaries/data/mods/public/simulation/components/VisionSharing.js
Show All 17 Lines | |||||
VisionSharing.prototype.Init = function() | VisionSharing.prototype.Init = function() | ||||
{ | { | ||||
this.activated = false; | this.activated = false; | ||||
this.shared = undefined; | this.shared = undefined; | ||||
this.spyId = 0; | this.spyId = 0; | ||||
this.spies = undefined; | this.spies = undefined; | ||||
}; | }; | ||||
VisionSharing.prototype.Update = function(newTemplate) { | |||||
this.template = newTemplate; | |||||
if (this.activated) | |||||
this.CheckVisionSharings(); | |||||
}; | |||||
/** | /** | ||||
* As entities have not necessarily the VisionSharing component, it has to be activated | * As entities have not necessarily the VisionSharing component, it has to be activated | ||||
* before use so that the rangeManager can register it | * before use so that the rangeManager can register it | ||||
*/ | */ | ||||
VisionSharing.prototype.Activate = function() | VisionSharing.prototype.Activate = function() | ||||
{ | { | ||||
if (this.activated) | if (this.activated) | ||||
return; | return; | ||||
▲ Show 20 Lines • Show All 145 Lines • Show Last 20 Lines |
Wildfire Games · Phabricator