bix fix
This commit is contained in:
parent
94e03b3f3c
commit
17a6fb6340
1 changed files with 8 additions and 2 deletions
|
@ -52,7 +52,13 @@ const create_map_dot = (data, x, y) => {
|
|||
return dot
|
||||
}
|
||||
|
||||
const update_item_sprites = (data) => {
|
||||
const update_item_sprites = (data, sprites) => {
|
||||
|
||||
for (const sprite of sprites) {
|
||||
if (sprite !== undefined) {
|
||||
sprite.destroy()
|
||||
}
|
||||
}
|
||||
|
||||
let item_sprites = {}
|
||||
|
||||
|
@ -95,7 +101,7 @@ export const startGraphicsUpdater = () => {
|
|||
}
|
||||
|
||||
if (Object.keys(item_sprites).length !== Object.keys(data.map.items).length) {
|
||||
item_sprites = update_item_sprites(data)
|
||||
item_sprites = update_item_sprites(data, item_sprites)
|
||||
console.log("updating item sprites")
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue