diff --git a/js/tileset.js b/js/tileset.js index 0d2344b..539757d 100644 --- a/js/tileset.js +++ b/js/tileset.js @@ -137,8 +137,13 @@ export const CC2_TILESET_LAYOUT = { }, dynamite: [0, 4], - // FIXME lit frames - dynamite_lit: [0, 4], + dynamite_lit: { + 0: [0, 4], + 1: [1, 4], + 2: [2, 4], + 3: [3, 4], + 4: [4, 4], + }, bomb: [5, 4], green_bomb: [6, 4], // TODO bomb fuse tile, ugh diff --git a/js/tiletypes.js b/js/tiletypes.js index 54a8087..8a243cc 100644 --- a/js/tiletypes.js +++ b/js/tiletypes.js @@ -1,4 +1,4 @@ -import { COLLISION, DIRECTIONS, DIRECTION_ORDER, DRAW_LAYERS } from './defs.js'; +import { COLLISION, DIRECTIONS, DIRECTION_ORDER, DRAW_LAYERS, TICS_PER_SECOND } from './defs.js'; import { random_choice } from './util.js'; function activate_me(me, level) { @@ -2301,6 +2301,10 @@ const TILE_TYPES = { } } }, + visual_state(me) { + // 0 1 2 3 4 + return Math.min(4, Math.max(0, Math.floor((me.timer ?? 0) / TICS_PER_SECOND))); + }, }, bowling_ball: { draw_layer: DRAW_LAYERS.item, diff --git a/tileset-lexy.png b/tileset-lexy.png index 9330797..84f49fc 100644 Binary files a/tileset-lexy.png and b/tileset-lexy.png differ diff --git a/tileset-src/tileset-lexy.aseprite b/tileset-src/tileset-lexy.aseprite index 4f923b0..dd95b88 100644 Binary files a/tileset-src/tileset-lexy.aseprite and b/tileset-src/tileset-lexy.aseprite differ