public void applyGlobalSlowRegen() { if (regenPerDayWithFood > 0) { foreach (var npc in ownedNPC.getNPCs()) { buffSystem.regenApplyingSystem(npc, starvingTickTimer, starvingTickTimer / (float)regenPerDayWithFood, 1); } buffSystem.regenApplyingSystem(player, starvingTickTimer, starvingTickTimer / (float)regenPerDayWithFood, 1); } }
void Update() { timeFromLastApply += Time.deltaTime; if (timeFromLastApply > timeBetweenReapplication) { timeFromLastApply = 0; foreach (Collider victim in targets) { buffsys.regenApplyingSystem(victim.gameObject, regenDuration, regenTickTime, healingPerTick); } } }