Skip to content

five-on-it / apps/level-editor/src/scripts/blocks/substation / default

Class: default ​

Defined in: apps/level-editor/src/scripts/blocks/substation.ts:15

The block's script: its presence on a node is what marks the node; its fields are the blackout it causes.

Implements ​

  • IScript

Constructors ​

Constructor ​

new default(mesh): SubstationBlock

Defined in: apps/level-editor/src/scripts/blocks/substation.ts:29

Parameters ​

mesh ​

Mesh

Returns ​

SubstationBlock

Properties ​

mesh ​

readonly mesh: Mesh

Defined in: apps/level-editor/src/scripts/blocks/substation.ts:27


radius ​

radius: number = 60

Defined in: apps/level-editor/src/scripts/blocks/substation.ts:18

How far round it the district goes dark (m).


seconds ​

seconds: number = 90

Defined in: apps/level-editor/src/scripts/blocks/substation.ts:22

How long it stays dark (s).

Methods ​

onStart() ​

onStart(): void

Defined in: apps/level-editor/src/scripts/blocks/substation.ts:25

Nothing to do at play time: the block is read by npm run level:export.

Returns ​

void

Implementation of ​

IScript.onStart