dodelani dnevnik

This commit is contained in:
2025-12-08 03:15:53 +01:00
parent 860a10a5c3
commit 4c3ee03007
11 changed files with 488 additions and 72 deletions

View File

@@ -0,0 +1,39 @@
class ZombieWorkerSystem {
constructor(scene) {
this.scene = scene;
this.workers = []; // Array of tames zombies
this.graves = []; // Array of grave locations
console.log('🧟 ZombieWorkerSystem: Initialized');
}
// Dodaj zombija med delavce
addWorker(zombieEntity) {
this.workers.push({
entity: zombieEntity,
task: 'IDLE', // FARM, MINE, GUARD, REST
energy: 100, // Decay meter
xp: 0
});
console.log('🧟 New Worker Assigned!');
}
// Dodelitev naloge
assignTask(workerIndex, taskType, location) {
if (this.workers[workerIndex]) {
this.workers[workerIndex].task = taskType;
this.workers[workerIndex].targetLocation = location;
}
}
update(time, delta) {
// Logic for worker AI, decay, and farming automation
this.workers.forEach(worker => {
if (worker.energy > 0) {
worker.energy -= 0.01; // Decay over time
// TODO: Execute Task Logic
} else {
// TODO: Rot / Die logic
}
});
}
}