Options
All
  • Public
  • Public/Protected
  • All
Menu

Class WorldLayer

Hierarchy

  • WorldLayer

Implements

Index

Constructors

constructor

  • Parameters

    • width: number
    • height: number
    • level: WorldZ

    Returns WorldLayer

Properties

exploredMap

exploredMap: IExploreMap | undefined

Readonly height

height: number

Readonly level

level: WorldZ

Readonly lightBlockMap

lightBlockMap: IByteGrid

Readonly lightLevelMap

lightLevelMap: IColorGrid

onDoodadUpdate

onDoodadUpdate: onDoodadUpdateDelegate

onTileUpdate

onTileUpdate: onTileUpdateDelegate

Readonly width

width: number

Methods

delete

  • delete(): void
  • Returns void

getTile

getTileDecoration

  • getTileDecoration(x: number, y: number): any

getTileType

  • getTileType(x: number, y: number): TerrainType
  • Parameters

    • x: number
    • y: number

    Returns TerrainType

getType

isDoodadAnimationDisabled

  • isDoodadAnimationDisabled(terrain: TerrainData): boolean
  • Parameters

    Returns boolean

isDoodadOverHidden

isFence

isTilled

isWall

setTile

  • setTile(x: number, y: number, terrainType: TerrainType, terrainMasks?: TerrainMask): void
  • Parameters

    • x: number
    • y: number
    • terrainType: TerrainType
    • Default value terrainMasks: TerrainMask = TerrainMask.None

    Returns void

updateAll

  • updateAll(): void

updateTile

  • updateTile(x: number, y: number, tile: ITile, shouldUpdate?: boolean, updateNeighbors?: boolean, flushImmediate?: boolean, recentlyUpdatedFiles?: Set<string>, debug?: undefined | false | true): void
  • Parameters

    • x: number
    • y: number
    • tile: ITile
    • Default value shouldUpdate: boolean = false
    • Default value updateNeighbors: boolean = true
    • Default value flushImmediate: boolean = shouldUpdate && world.isLoaded()
    • Optional recentlyUpdatedFiles: Set<string>
    • Optional debug: undefined | false | true

    Returns void

Generated using TypeDoc