Changeset View
Changeset View
Standalone View
Standalone View
binaries/data/mods/public/simulation/components/Fogging.js
Show All 33 Lines | Fogging.prototype.Init = function() | ||||
for (let player = 0; player < numPlayers; ++player) | for (let player = 0; player < numPlayers; ++player) | ||||
{ | { | ||||
this.mirages.push(INVALID_ENTITY); | this.mirages.push(INVALID_ENTITY); | ||||
this.miraged.push(false); | this.miraged.push(false); | ||||
this.seen.push(false); | this.seen.push(false); | ||||
} | } | ||||
}; | }; | ||||
Fogging.prototype.Update = function(newTemplate) | |||||
{ | |||||
this.template = newTemplate; | |||||
// Do we need to do anything ? | |||||
}; | |||||
Fogging.prototype.Activate = function() | Fogging.prototype.Activate = function() | ||||
{ | { | ||||
let mustUpdate = !this.activated; | let mustUpdate = !this.activated; | ||||
this.activated = true; | this.activated = true; | ||||
if (mustUpdate) | if (mustUpdate) | ||||
{ | { | ||||
// Load a mirage for each player who has already seen the entity. | // Load a mirage for each player who has already seen the entity. | ||||
▲ Show 20 Lines • Show All 167 Lines • Show Last 20 Lines |
Wildfire Games · Phabricator