Don't create animation if assets isnt in sprite_animations group

This commit is contained in:
Dennis Postma 2024-09-23 14:10:40 +02:00
parent 0f01a4ec7c
commit 8c8ec69f42

View File

@ -64,7 +64,7 @@ const gameConfig = {
antialias: true, antialias: true,
roundPixels: true roundPixels: true
}, },
resolution: 5, resolution: 10,
pixelArt: true pixelArt: true
} }
@ -138,6 +138,8 @@ const createScene = async (scene: Phaser.Scene) => {
* This is done here because phaser forces us to * This is done here because phaser forces us to
*/ */
gameStore.assets.forEach((asset) => { gameStore.assets.forEach((asset) => {
if (asset.group !== 'sprite_animations') return
scene.anims.create({ scene.anims.create({
key: asset.key, key: asset.key,
frameRate: 7, frameRate: 7,