Commit Graph

21 Commits

Author SHA1 Message Date
PizZaKatZe
9c8393c102 Bump Phaser version 2021-05-27 21:52:00 +02:00
Johannes Berthel
ea9c9ff2c3 use negative radius 2021-05-27 21:44:24 +02:00
Johannes Berthel
5ae8bfe06b fixed linting 2021-05-27 21:44:10 +02:00
Johannes Berthel
a0f1f0c04b added comment for new phaser version compatibility 2021-05-27 21:43:55 +02:00
Johannes Berthel
243d4d6565 fixed hitbox calculation 2021-05-27 21:43:37 +02:00
Johannes Berthel
7fef260b38 fixed function comment 2021-05-27 21:43:20 +02:00
Johannes Berthel
359d349ba7 refactored code 2021-05-27 21:42:59 +02:00
Johannes Berthel
09ceb016b7 refactored code 2021-05-27 21:42:40 +02:00
Johannes Berthel
70d2223e00 refactored code 2021-05-27 21:42:17 +02:00
Johannes Berthel
4f3e0f9921 fixed depth for interactive layers 2021-05-27 21:40:30 +02:00
Johannes Berthel
1f7a3880bf made interaction work with remote players 2021-05-27 21:37:51 +02:00
Johannes Berthel
2273a84d0e added reverse animation 2021-05-27 21:36:54 +02:00
Johannes Berthel
3e20fb89ca added interaction radius 2021-05-27 21:36:14 +02:00
Johannes Berthel
66c20687c3 added basic interactive layer functionality 2021-05-27 21:34:32 +02:00
David Négrier
4d4f845b9e Setting "importsNotUsedAsValues": "error"
Turning the "importsNotUsedAsValues" TS config value to "error".
This will require us to use `import type` instead of `import` when we are importing a value that is only used as a type (and therefore that is dropped by the Typescript compiler).

Why this change?
This is a requirement to be able to use Svelte in the future. See https://github.com/sveltejs/svelte-preprocess/issues/206#issuecomment-663193798
2021-05-12 09:13:25 +02:00
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