Class Property

java.lang.Object
org.openpatch.scratch.extensions.tiled.Property

public class Property extends Object
The Property class represents a property of a Tiled object. It includes fields for the property name, type, and value.

Example usage:

Property p = new Property();
p.name = "myProperty";
p.type = "number";
p.value = "42";
  • Field Details

    • name

      public String name
      The name of the property.
    • type

      public String type
      The type of the property.
    • value

      public String value
      The value of the property.
    • properties

      public List<Property> properties
      A class-typed property (Tiled 1.8+) holds its members as nested properties.
  • Constructor Details

    • Property

      public Property()
  • Method Details

    • setText

      public void setText(String text)
      Multi-line strings are written as the element's text instead of a value attribute.
      Parameters:
      text - the element text