stable
This commit is contained in:
parent
fbdac9ebf1
commit
86226ccc94
97 changed files with 5790 additions and 2307 deletions
15
js/tarinai_update_step_health.js
Normal file
15
js/tarinai_update_step_health.js
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
"use strict";
|
||||
|
||||
// Layer: entity-runtime/tarinai/update-step
|
||||
// Owns end-of-frame wake lock and life/death checks.
|
||||
(function (global) {
|
||||
function update(t, dt, context = {}) {
|
||||
if (!t) return { done: true };
|
||||
const sleepingAtFrameEnd = t.state === "sleep" || t.sleeping;
|
||||
if (context.wasSleepingAtFrameStart && !sleepingAtFrameEnd && !t.dead) t.awakeLockTimer = Math.max(t.awakeLockTimer || 0, 10);
|
||||
t.checkLife(dt);
|
||||
return { done: true };
|
||||
}
|
||||
|
||||
global.TarinaiHealthUpdateStep = Object.freeze({ update });
|
||||
})(typeof window !== "undefined" ? window : globalThis);
|
||||
Loading…
Add table
Add a link
Reference in a new issue