Commit graph

6 commits

Author SHA1 Message Date
David Négrier 22cb41dc29 Adding the ability to display "Text" objects from Tiled
I honestly don't believe text objects look good on map, and in real maps, I think text should be written on tiles.

However, for a variety of use cases (like in test maps in the /maps/test directory, it can be useful to be
able to display some text easily on a map.

This PR adds the ability to display this text.

Note: the "font" support cannot work correctly, as Tiled is listing fonts from the local
system, and those fonts are not available in a browser.
2021-04-26 11:28:13 +02:00
David Négrier 6815fe7a0a Added a new LayersIterator class
This class iterates recursively over layers, flattening groups.
This enables us to simplify the code when we iterate layers. We can remove all recursive function calls in the GameScene code (it is delegated to the LayersIterator)
2021-04-26 11:21:34 +02:00
Lurkars 9b6be3466b support for group layer of Tiled (excludes 'start' layer) 2021-04-26 11:20:28 +02:00
David Négrier 6fbf165c91 Adding the ability to register a single script using the "script" attribute at the map property level. 2021-03-07 21:02:38 +01:00
David Négrier e2be99490b Finishing removing any reference to "any" in the front. 2020-06-19 16:36:40 +02:00
David Négrier 482a344f45 Autoload tiles
This commit adds a listener in the preload function that will be triggered as soon as the map is loaded.
This function will load the resources from the map (tilesets) defined in the map.
That way, we don't have to define manually the list of tiles that have to be loaded (at the expense of a slight delay in loading since we must wait for the map to be loaded to start loading the tiles).
2020-04-15 19:23:06 +02:00