Update docs on representation model

This commit is contained in:
Daniel Cronqvist 2024-09-02 17:30:12 +02:00
parent df075eed8d
commit 3185e038c0

View file

@ -2,8 +2,8 @@
Tiled map files contain various types of data, such as tilesets, layers, and object groups. The representation model is a way to represent this data in a structured way. By using the `.tmx` file format as inspiration, the representation model is a collection of classes which mimic the structure of a Tiled map file. Tiled map files contain various types of data, such as tilesets, layers, and object groups. The representation model is a way to represent this data in a structured way. By using the `.tmx` file format as inspiration, the representation model is a collection of classes which mimic the structure of a Tiled map file.
Certain properties throughout the representation model are marked as *optional*, meaning that they may not be present in a file. However, these properties sometimes have default values, which are used when the property is not present. Certain properties throughout the representation model are marked as *optional* by being either wrapped in a <xref:DotTiled.Optional`1> or by having a set default value.
- Properties marked as *required* must be present in the file, otherwise an error will be raised. - Properties that make use of the [required](https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/keywords/required) keyword must be present in the file, otherwise an error will be raised.
- Properties that have default values will use the default value if the property is not present in the file, and are not marked as required or optional since you must not provide a value for them. - Properties that have default values will use the default value if the property is not present in the file, and are not marked as required or optional since you must not provide a value for them.
- Properties that are marked as *optional* may or may not be present in the file, and have no default value. - Properties that are wrapped in <xref:DotTiled.Optional`1> may or may not be present in the file, and have no default value.