From 2c6cd362c32a2e9460e5ddebd85f050b9b5ab4e4 Mon Sep 17 00:00:00 2001 From: Matthias Schiffer Date: Wed, 21 Nov 2018 21:44:11 +0100 Subject: Allow using animated entities as map tiles A more optimized implementation for animated tiles is planned. --- dist/resources/entity/water.json | 12 ++++++++++++ dist/resources/map/test.json | 34 ++++++++++++++++----------------- dist/resources/sprite/entity/water.png | Bin 0 -> 1718 bytes dist/resources/sprite/tile/water.png | Bin 778 -> 0 bytes 4 files changed, 29 insertions(+), 17 deletions(-) create mode 100644 dist/resources/entity/water.json create mode 100644 dist/resources/sprite/entity/water.png delete mode 100644 dist/resources/sprite/tile/water.png (limited to 'dist/resources') diff --git a/dist/resources/entity/water.json b/dist/resources/entity/water.json new file mode 100644 index 0000000..79c7780 --- /dev/null +++ b/dist/resources/entity/water.json @@ -0,0 +1,12 @@ +{ + "sprite": "water", + "frames": 4, + "animation": { + "sequence": [ + [500, 0], + [500, 1], + [500, 2], + [500, 3] + ] + } +} diff --git a/dist/resources/map/test.json b/dist/resources/map/test.json index ec3b3fb..91efc19 100644 --- a/dist/resources/map/test.json +++ b/dist/resources/map/test.json @@ -1,22 +1,22 @@ { "tiles": [ - "stone/floor", - "stone/plate", - "stone/wall/top", - "stone/wall/right", - "stone/wall/bottom", - "stone/wall/left", - "stone/wall/top_left", - "stone/wall/top_right", - "stone/wall/bottom_right", - "stone/wall/bottom_left", - "stone/wall/top_left_inner", - "stone/wall/top_right_inner", - "stone/wall/bottom_right_inner", - "stone/wall/bottom_left_inner", - "water", - "stone/border/bottom_right", - "stone/border/bottom_left" + "-stone/floor", + "-stone/plate", + "-stone/wall/top", + "-stone/wall/right", + "-stone/wall/bottom", + "-stone/wall/left", + "-stone/wall/top_left", + "-stone/wall/top_right", + "-stone/wall/bottom_right", + "-stone/wall/bottom_left", + "-stone/wall/top_left_inner", + "-stone/wall/top_right_inner", + "-stone/wall/bottom_right_inner", + "-stone/wall/bottom_left_inner", + "@water", + "-stone/border/bottom_right", + "-stone/border/bottom_left" ], "layers": [ { diff --git a/dist/resources/sprite/entity/water.png b/dist/resources/sprite/entity/water.png new file mode 100644 index 0000000..61c2d4f Binary files /dev/null and b/dist/resources/sprite/entity/water.png differ diff --git a/dist/resources/sprite/tile/water.png b/dist/resources/sprite/tile/water.png deleted file mode 100644 index 4a96543..0000000 Binary files a/dist/resources/sprite/tile/water.png and /dev/null differ -- cgit v1.2.3