Table of Contents

Class Object

Namespace
DotTiled
Assembly
DotTiled.dll

Base class for objects in object layers.

public abstract class Object : HasPropertiesBase, IHasProperties
Inheritance
Object
Implements
Derived
Inherited Members

Properties

Height

The height of the object in pixels.

public float Height { get; set; }

Property Value

float

ID

Unique ID of the objects. Each object that is placed on a map gets a unique ID. Even if an object was deleted, no object gets the same ID.

public Optional<uint> ID { get; set; }

Property Value

Optional<uint>

Name

The name of the object. An arbitrary string.

public string Name { get; set; }

Property Value

string

Properties

Object properties.

public List<IProperty> Properties { get; set; }

Property Value

List<IProperty>

Rotation

The rotation of the object in degrees clockwise around (X, Y).

public float Rotation { get; set; }

Property Value

float

Template

A reference to a template file.

public Optional<string> Template { get; set; }

Property Value

Optional<string>

Type

The class of the object. An arbitrary string.

public string Type { get; set; }

Property Value

string

Visible

Whether the object is shown (true) or hidden (false).

public bool Visible { get; set; }

Property Value

bool

Width

The width of the object in pixels.

public float Width { get; set; }

Property Value

float

X

The X coordinate of the object in pixels.

public float X { get; set; }

Property Value

float

Y

The Y coordinate of the object in pixels.

public float Y { get; set; }

Property Value

float

Methods

GetProperties()

The properties attached to the object.

public override IList<IProperty> GetProperties()

Returns

IList<IProperty>