Class: FogModifier#

Hierarchy#

  • Handle<fogmodifier>

    ↳ FogModifier

Constructors#

constructor#

new FogModifier(forWhichPlayer: MapPlayer, whichState: fogstate, centerX: number, centerY: number, radius: number, useSharedVision: boolean, afterUnits: boolean): FogModifier

Parameters:#

NameTypeDescription
forWhichPlayerMapPlayer
whichStatefogstateDetermines what type of fog the area is being modified to.
centerXnumberThe x-coordinate where the fog modifier begins.
centerYnumberThe y-coordinate where the fog modifier begins.
radiusnumberDetermines the extent that the fog travels (expanding from the coordinates ( centerx , centery )).
useSharedVisionbooleanDetermines whether or not the fog modifier will be applied to allied players with shared vision.
afterUnitsbooleanWill determine whether or not units in that area will be masked by the fog. If it is set to true and the fogstate is masked, it will hide all the units in the fog modifier's radius and mask the area. If set to false, it will only mask the areas that are not visible to the units.

Returns: FogModifier

Defined in: handles/fogmodifier.ts:7

Properties#

handle#

• Readonly handle: fogmodifier

Inherited from: Handle.handle

Defined in: handles/handle.ts:6

Accessors#

id#

id(): number

Get the unique ID of the handle. The ID is recycled once you destroy the object.

Returns: number

The unique ID of a handle object.

Defined in: handles/handle.ts:18

Methods#

destroy#

destroy(): void

Returns: void

Defined in: handles/fogmodifier.ts:28


start#

start(): void

Returns: void

Defined in: handles/fogmodifier.ts:32


stop#

stop(): void

Returns: void

Defined in: handles/fogmodifier.ts:36


fromHandle#

static fromHandle(handle: fogmodifier): FogModifier

Parameters:#

NameType
handlefogmodifier

Returns: FogModifier

Defined in: handles/fogmodifier.ts:40


fromRect#

static fromRect(forWhichPlayer: MapPlayer, whichState: fogstate, where: Rectangle, useSharedVision: boolean, afterUnits: boolean): FogModifier

Parameters:#

NameType
forWhichPlayerMapPlayer
whichStatefogstate
whereRectangle
useSharedVisionboolean
afterUnitsboolean

Returns: FogModifier

Defined in: handles/fogmodifier.ts:44