fix: camera movement makes character blurry

This commit is contained in:
Rijad Zuzo
2026-06-17 19:47:49 +02:00
parent 20027bed4b
commit a504ed8112
6 changed files with 114 additions and 2 deletions
+47
View File
@@ -0,0 +1,47 @@
class_name SimNPC
extends RefCounted
var id: int
var npc_name: String
var profession: String
var hunger: float
var energy: float
var strength: float
var intelligence: float
var current_task: String = "idle"
func _init(
_id: int,
_npc_name: String,
_profession: String,
_strength: float,
_intelligence: float
) -> void:
id = _id
npc_name = _npc_name
profession = _profession
strength = _strength
intelligence = _intelligence
hunger = randf_range(20.0, 80.0)
energy = randf_range(40.0, 100.0)
func simulate_tick() -> void:
hunger += 5.0
energy -= 2.0
if hunger > 75.0:
current_task = "eat"
hunger -= 25.0
elif energy < 30.0:
current_task = "rest"
energy += 20.0
elif profession == "farmer":
current_task = "gather_food"
elif profession == "woodcutter":
current_task = "gather_wood"
elif profession == "guard":
current_task = "patrol"
elif profession == "scholar":
current_task = "study"
else:
current_task = "wander"