stanje 4am

This commit is contained in:
2025-12-07 04:19:57 +01:00
parent 521468c797
commit 03a9cd46a2
20 changed files with 619 additions and 168 deletions

View File

@@ -30,7 +30,31 @@ class PreloadScene extends Phaser.Scene {
// Wait for load completion then process transparency
this.load.once('complete', () => {
this.processAllTransparency();
this.createAnimations();
});
// New Processed Animations (Standardized 64x64 strips)
this.load.spritesheet('player_walk', 'assets/sprites/player_walk_strip.png', { frameWidth: 64, frameHeight: 64 });
this.load.spritesheet('zombie_walk', 'assets/sprites/zombie_walk_strip.png', { frameWidth: 64, frameHeight: 64 });
}
createAnimations() {
if (this.anims.exists('player_walk_anim')) return;
this.anims.create({
key: 'player_walk_anim',
frames: this.anims.generateFrameNumbers('player_walk', { start: 0, end: 5 }),
frameRate: 12,
repeat: -1
});
this.anims.create({
key: 'zombie_walk_anim',
frames: this.anims.generateFrameNumbers('zombie_walk', { start: 0, end: 5 }),
frameRate: 8,
repeat: -1
});
console.log('🎞️ Animations created!');
}
processAllTransparency() {