You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+52-17
Original file line number
Diff line number
Diff line change
@@ -26,14 +26,19 @@ Load a TMX file into a string by any means, and then pass the string to TileMapP
26
26
27
27
```dart
28
28
final String tmxBody = /* ... */;
29
-
final TiledMap mapTmx = TileMapParser.parseTmx(tmxBody);
29
+
final TiledMap mapTmx = TiledMap.parseTmx(tmxBody);
30
30
```
31
31
32
-
If your tmx file includes a external tsx reference, you have to add a CustomParser. This can either be done by using extending the TsxProviderBase, which can match multiple files, or by extending TsxProvider, which only matches on file by its name.
32
+
If your tmx file includes external reference, e.g. for .tsx files, you have to add providers.
33
+
These providers are then used to find these files and load their contents as a string,
34
+
as well as maybe caching them.
35
+
36
+
To construct a provider for tsx files for example you can just extend the Provider<Parser>
37
+
or ParserProvider class, which is just a type alias.
33
38
```dart
34
-
class MultipleTsxProvider extends TsxProviderBase {
39
+
class MultipleTsxProvider extends ParserProvider {
0 commit comments