Bug fixes: Disabled missing Tiled map loading && Added safety checks for zombie_walk texture
This commit is contained in:
@@ -31,10 +31,10 @@ class PreloadScene extends Phaser.Scene {
|
||||
this.load.image('tileset_dirt', 'assets/tilesets/dirt.png');
|
||||
this.load.image('tileset_decorations', 'assets/tilesets/decorations.png');
|
||||
|
||||
// 🗺️ TILED MAP (JSON export from Tiled Editor)
|
||||
this.load.tilemapTiledJSON('farm_map', 'assets/maps/farm_map.json');
|
||||
this.load.tilemapTiledJSON('micro_farm_128x128', 'assets/maps/micro_farm_128x128.json'); // 🌾 Testna farma
|
||||
this.load.tilemapTiledJSON('micro_farm_8x8', 'assets/maps/micro_farm_8x8.json'); // 🏕️ Manjša test mapa
|
||||
// 🗺️ TILED MAP (JSON export from Tiled Editor) - DISABLED (files removed)
|
||||
// this.load.tilemapTiledJSON('farm_map', 'assets/maps/farm_map.json');
|
||||
// this.load.tilemapTiledJSON('micro_farm_128x128', 'assets/maps/micro_farm_128x128.json'); // 🌾 Testna farma
|
||||
// this.load.tilemapTiledJSON('micro_farm_8x8', 'assets/maps/micro_farm_8x8.json'); // 🏕️ Manjša test mapa
|
||||
this.load.image('grass_tileset_img', 'assets/tilesets/grass.png');
|
||||
this.load.image('water_tileset_img', 'assets/tilesets/water.png');
|
||||
this.load.image('decorations_tileset_img', 'assets/tilesets/decorations.png');
|
||||
@@ -386,13 +386,17 @@ class PreloadScene extends Phaser.Scene {
|
||||
createAnimations() {
|
||||
if (this.anims.exists('protagonist_walk')) return;
|
||||
|
||||
// Zombie animations
|
||||
this.anims.create({
|
||||
key: 'zombie_walk_anim',
|
||||
frames: this.anims.generateFrameNumbers('zombie_walk', { start: 0, end: 5 }),
|
||||
frameRate: 8,
|
||||
repeat: -1
|
||||
});
|
||||
// Zombie animations (only if texture exists)
|
||||
if (this.textures.exists('zombie_walk')) {
|
||||
this.anims.create({
|
||||
key: 'zombie_walk_anim',
|
||||
frames: this.anims.generateFrameNumbers('zombie_walk', { start: 0, end: 5 }),
|
||||
frameRate: 8,
|
||||
repeat: -1
|
||||
});
|
||||
} else {
|
||||
console.warn('⚠️ Texture "zombie_walk" not found - skipping animation');
|
||||
}
|
||||
|
||||
this.anims.create({
|
||||
key: 'zombie_worker_walk',
|
||||
|
||||
Reference in New Issue
Block a user