Options
All
  • Public
  • Public/Protected
  • All
Menu

Visual class for the map-tiles.

param

the engine instance that the map-tile sits in

param

type-id of the tile as defined in the JSON file

Hierarchy

  • Container
    • TileView

Index

Constructors

constructor

  • Visual class constructor for the map-tiles.

    Parameters

    • engine: EngineView

      the engine instance that the map-tile sits in

    • type: string

      type-id of the tile as defined in the JSON file

    Returns TileView

Properties

Private _engine

_engine: EngineView

A reference to the engine view that the map-tile sits in.

property
internal

Private _highlightedOverlay

_highlightedOverlay: Sprite | Graphics

The visual that will be used to highlight the tile.

property
internal

Private _isHighlighted

_isHighlighted: boolean = false

The highlight state of the map-tile.

property
internal

Private _tileGraphics

_tileGraphics: AnimatedSprite
property
internal

isMovableTo

isMovableTo: boolean

Defines if the map-tile is movable onto by map-objects.

property

mapPos

Position of the tile in terms of column and row index.

property

Private onHighlightTweenEnd_binded

onHighlightTweenEnd_binded: () => void
property
internal

Type declaration

    • (): void
    • Returns void

type

type: string

Type-id of the map-tile as defined in the JSON file.

property

vertices

vertices: number[][]

Defines the positions of the vertices of the tile.

property

Methods

destroy

  • destroy(): void
  • Clears all references.

    method
    function

    Returns void

Private onHighlightTweenEnd

  • onHighlightTweenEnd(): void

setHighlighted

  • setHighlighted(isHighlighted: boolean, instant?: boolean): void
  • Changes the highlight state of the map-tile.

    method
    function

    Parameters

    • isHighlighted: boolean

      if the tile is being highlighted or not

    • instant: boolean = false

      if the change will be instant or animated, default false

    Returns void