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

@@ -50,14 +50,24 @@ class GameScene extends Phaser.Scene {
// Dodaj 3 NPCje
console.log('🧟 Initializing NPCs...');
// Dodaj 3 NPCje (Mixed)
console.log('🧟 Initializing NPCs...');
const npcTypes = ['zombie', 'villager', 'merchant'];
for (let i = 0; i < 3; i++) {
const randomX = Phaser.Math.Between(20, 80);
const randomY = Phaser.Math.Between(20, 80);
const randomX = Phaser.Math.Between(40, 60); // Closer to center
const randomY = Phaser.Math.Between(40, 60);
const npc = new NPC(this, randomX, randomY, this.terrainOffsetX, this.terrainOffsetY, npcTypes[i]);
this.npcs.push(npc);
}
// Dodaj 10 dodatnih Zombijev!
for (let i = 0; i < 10; i++) {
const randomX = Phaser.Math.Between(10, 90);
const randomY = Phaser.Math.Between(10, 90);
const zombie = new NPC(this, randomX, randomY, this.terrainOffsetX, this.terrainOffsetY, 'zombie');
this.npcs.push(zombie);
}
// Kamera sledi igralcu z izboljšanimi nastavitvami
this.cameras.main.startFollow(this.player.sprite, true, 1.0, 1.0); // Instant follow (was 0.1)
@@ -192,8 +202,8 @@ class GameScene extends Phaser.Scene {
if (this.statsSystem) this.statsSystem.update(delta);
if (this.interactionSystem) this.interactionSystem.update(delta);
if (this.farmingSystem) this.farmingSystem.update(delta);
if (this.weatherSystem) this.weatherSystem.update(delta);
if (this.dayNightSystem) this.dayNightSystem.update();
if (this.weatherSystem) this.weatherSystem.update(delta);
// Update Parallax (foreground grass fading)
if (this.parallaxSystem && this.player) {