Merge remote-tracking branch 'origin/main' into feature/map-refactor
This commit is contained in:
@ -73,18 +73,17 @@ export async function loadSpriteTextures(scene: Phaser.Scene, sprite_id: string)
|
||||
await loadTexture(scene, {
|
||||
key,
|
||||
data: '/textures/sprites/' + sprite.id + '/' + sprite_action.action + '.png',
|
||||
group: sprite_action.isAnimated ? 'sprite_animations' : 'sprites',
|
||||
group: sprite_action.frameCount > 1 ? 'sprite_animations' : 'sprites',
|
||||
updatedAt: sprite_action.updatedAt,
|
||||
originX: sprite_action.originX,
|
||||
originY: sprite_action.originY,
|
||||
isAnimated: sprite_action.isAnimated,
|
||||
frameWidth: sprite_action.frameWidth,
|
||||
frameHeight: sprite_action.frameHeight,
|
||||
frameRate: sprite_action.frameRate
|
||||
} as TextureData)
|
||||
|
||||
// If the sprite is not animated, skip
|
||||
if (!sprite_action.isAnimated) continue
|
||||
// If the sprite has no more than one frame, skip
|
||||
if (sprite_action.frameCount <= 1) continue
|
||||
|
||||
// Check if animation already exists
|
||||
if (scene.anims.get(key)) continue
|
||||
|
Reference in New Issue
Block a user