Options
All
  • Public
  • Public/Protected
  • All
Menu

Class WorldLayer

Hierarchy

  • WorldLayer

Implements

Index

Constructors

constructor

  • new WorldLayer(width: number, height: number, level: number): WorldLayer
  • Parameters

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

    Returns WorldLayer

Properties

exploredMap

exploredMap: IExploreMap

height

height: number

level

level: number

lightBlockMap

lightBlockMap: IByteGrid

lightLevelMap

lightLevelMap: IByteGrid

onDoodadUpdate

onDoodadUpdate: onDoodadUpdateDelegate

onTileUpdate

onTileUpdate: onTileUpdateDelegate

width

width: number

Methods

delete

  • delete(): void
  • Returns void

getTile

getTileType

  • getTileType(x: number, y: number): TerrainType.DeepSeawater | TerrainType.Seawater | TerrainType.ShallowSeawater | TerrainType.DeepFreshWater | TerrainType.FreshWater | TerrainType.ShallowFreshWater | TerrainType.Grass | TerrainType.Gravel | TerrainType.Dirt | TerrainType.Sand | TerrainType.Snow | TerrainType.Swamp | TerrainType.Clay | TerrainType.Ash | TerrainType.Rocks | TerrainType.RocksWithIron | TerrainType.RocksWithTalc | TerrainType.RocksWithCoal | TerrainType.RocksWithLimestone | TerrainType.CobblestoneFlooring | TerrainType.Sandstone | TerrainType.SandstoneFlooring | TerrainType.SandstoneWithIron | TerrainType.SandstoneWithNiter | TerrainType.WoodenFlooring | TerrainType.ClayBrickFlooring | TerrainType.CaveEntrance | TerrainType.RedCarpet | TerrainType.Lava | TerrainType.FertileDirt
  • Parameters

    • x: number
    • y: number

    Returns TerrainType.DeepSeawater | TerrainType.Seawater | TerrainType.ShallowSeawater | TerrainType.DeepFreshWater | TerrainType.FreshWater | TerrainType.ShallowFreshWater | TerrainType.Grass | TerrainType.Gravel | TerrainType.Dirt | TerrainType.Sand | TerrainType.Snow | TerrainType.Swamp | TerrainType.Clay | TerrainType.Ash | TerrainType.Rocks | TerrainType.RocksWithIron | TerrainType.RocksWithTalc | TerrainType.RocksWithCoal | TerrainType.RocksWithLimestone | TerrainType.CobblestoneFlooring | TerrainType.Sandstone | TerrainType.SandstoneFlooring | TerrainType.SandstoneWithIron | TerrainType.SandstoneWithNiter | TerrainType.WoodenFlooring | TerrainType.ClayBrickFlooring | TerrainType.CaveEntrance | TerrainType.RedCarpet | TerrainType.Lava | TerrainType.FertileDirt

getType

  • getType(terrain: TerrainData): TerrainType.DeepSeawater | TerrainType.Seawater | TerrainType.ShallowSeawater | TerrainType.DeepFreshWater | TerrainType.FreshWater | TerrainType.ShallowFreshWater | TerrainType.Grass | TerrainType.Gravel | TerrainType.Dirt | TerrainType.Sand | TerrainType.Snow | TerrainType.Swamp | TerrainType.Clay | TerrainType.Ash | TerrainType.Rocks | TerrainType.RocksWithIron | TerrainType.RocksWithTalc | TerrainType.RocksWithCoal | TerrainType.RocksWithLimestone | TerrainType.CobblestoneFlooring | TerrainType.Sandstone | TerrainType.SandstoneFlooring | TerrainType.SandstoneWithIron | TerrainType.SandstoneWithNiter | TerrainType.WoodenFlooring | TerrainType.ClayBrickFlooring | TerrainType.CaveEntrance | TerrainType.RedCarpet | TerrainType.Lava | TerrainType.FertileDirt
  • Parameters

    Returns TerrainType.DeepSeawater | TerrainType.Seawater | TerrainType.ShallowSeawater | TerrainType.DeepFreshWater | TerrainType.FreshWater | TerrainType.ShallowFreshWater | TerrainType.Grass | TerrainType.Gravel | TerrainType.Dirt | TerrainType.Sand | TerrainType.Snow | TerrainType.Swamp | TerrainType.Clay | TerrainType.Ash | TerrainType.Rocks | TerrainType.RocksWithIron | TerrainType.RocksWithTalc | TerrainType.RocksWithCoal | TerrainType.RocksWithLimestone | TerrainType.CobblestoneFlooring | TerrainType.Sandstone | TerrainType.SandstoneFlooring | TerrainType.SandstoneWithIron | TerrainType.SandstoneWithNiter | TerrainType.WoodenFlooring | TerrainType.ClayBrickFlooring | TerrainType.CaveEntrance | TerrainType.RedCarpet | TerrainType.Lava | TerrainType.FertileDirt

isFence

isTilled

isWall

resetExploredMap

  • resetExploredMap(): void

setTile

  • setTile(x: number, y: number, terrainType: TerrainType.DeepSeawater | TerrainType.Seawater | TerrainType.ShallowSeawater | TerrainType.DeepFreshWater | TerrainType.FreshWater | TerrainType.ShallowFreshWater | TerrainType.Grass | TerrainType.Gravel | TerrainType.Dirt | TerrainType.Sand | TerrainType.Snow | TerrainType.Swamp | TerrainType.Clay | TerrainType.Ash | TerrainType.Rocks | TerrainType.RocksWithIron | TerrainType.RocksWithTalc | TerrainType.RocksWithCoal | TerrainType.RocksWithLimestone | TerrainType.CobblestoneFlooring | TerrainType.Sandstone | TerrainType.SandstoneFlooring | TerrainType.SandstoneWithIron | TerrainType.SandstoneWithNiter | TerrainType.WoodenFlooring | TerrainType.ClayBrickFlooring | TerrainType.CaveEntrance | TerrainType.RedCarpet | TerrainType.Lava | TerrainType.FertileDirt, terrainMasks?: TerrainMask.None | TerrainMask.Type | TerrainMask.Tilled | TerrainMask.Wall | TerrainMask.Fence): void
  • Parameters

    • x: number
    • y: number
    • terrainType: TerrainType.DeepSeawater | TerrainType.Seawater | TerrainType.ShallowSeawater | TerrainType.DeepFreshWater | TerrainType.FreshWater | TerrainType.ShallowFreshWater | TerrainType.Grass | TerrainType.Gravel | TerrainType.Dirt | TerrainType.Sand | TerrainType.Snow | TerrainType.Swamp | TerrainType.Clay | TerrainType.Ash | TerrainType.Rocks | TerrainType.RocksWithIron | TerrainType.RocksWithTalc | TerrainType.RocksWithCoal | TerrainType.RocksWithLimestone | TerrainType.CobblestoneFlooring | TerrainType.Sandstone | TerrainType.SandstoneFlooring | TerrainType.SandstoneWithIron | TerrainType.SandstoneWithNiter | TerrainType.WoodenFlooring | TerrainType.ClayBrickFlooring | TerrainType.CaveEntrance | TerrainType.RedCarpet | TerrainType.Lava | TerrainType.FertileDirt
    • Default value terrainMasks: TerrainMask.None | TerrainMask.Type | TerrainMask.Tilled | TerrainMask.Wall | TerrainMask.Fence = TerrainMask.None

    Returns void

updateAll

  • updateAll(): void

updateTile

  • updateTile(x: number, y: number, tile: ITile, shouldUpdate?: boolean): void
  • Parameters

    • x: number
    • y: number
    • tile: ITile
    • Default value shouldUpdate: boolean = false

    Returns void

Generated using TypeDoc