Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

Index

Constructors

constructor

Properties

Readonly animated

animated: boolean

Indicates whether this tile is animated.

Readonly asset

asset: Asset

The asset this object is part of, or null.

frames

frames: frame[]

This tile’s animation as an array of frames.

Readonly height

height: number

Height of the tile in pixels.

Readonly id

id: number

ID of this tile within its tileset.

imageFileName

imageFileName: string

File name of the tile image (when the tile is part of an image collection tileset).

objectGroup

objectGroup: ObjectGroup

The ObjectGroup associated with the tile in case collision shapes were defined. Returns null if no collision shapes were defined for this tile.

probability

probability: number

Probability that the tile gets chosen relative to other tiles.

Readonly readOnly

readOnly: boolean

Whether the object is read-only.

Readonly size

size: size

Size of the tile in pixels.

Readonly tileset

tileset: Tileset

The tileset of the tile.

type

type: string

Type of the tile.

Readonly width

width: number

Width of the tile in pixels.

Static Readonly FlippedAntiDiagonally

FlippedAntiDiagonally: 4

Static Readonly FlippedHorizontally

FlippedHorizontally: 1

Static Readonly FlippedVertically

FlippedVertically: 2

Static Readonly RotatedHexagonal120

RotatedHexagonal120: 8

Methods

properties

  • Returns all custom properties set on this object.

    Modifications to the properties will not affect the original object. Does not include inherited values (see resolvedProperties).

property

  • Returns the value of the custom property with the given name, or undefined if no such property is set on the object. Does not include inherited values (see resolvedProperty).

    file properties are returned as FilePath.

    object properties are returned as MapObject when possible, or ObjectRef when the object could not be found.

removeProperty

  • removeProperty(name: string): void

resolvedProperties

  • Returns all custom properties set on this object. Modifications to the properties will not affect the original object. Includes values inherited from object types, templates and tiles where applicable.

resolvedProperty

  • Returns the value of the custom property with the given name, or undefined if no such property is set. Includes values inherited from object types, templates and tiles where applicable.

setImage

  • setImage(image: Image): void
  • Sets the image of this tile.

    warning

    This function has no undo and does not affect the saved tileset!

setProperties

setProperty

  • Sets the value of the custom property with the given name. Supported types are bool, number, string, FilePath, ObjectRef and MapObject.

    When setting a number, the property type will be set to either int or float, depending on whether it is a whole number.

    note

    Support for setting color properties is currently missing.

Generated using TypeDoc