tarinai/js/item_lifecycle_step_decay.js

13 lines
499 B
JavaScript

"use strict";
// Layer: entity-runtime/items/lifecycle-step
// Pipeline adapter for item decay. The decay implementation lives in
// js/item_lifecycle_decay_system.js.
(function (global) {
function update(item, dt, worldRef) {
if (!item || item.dead) return { done: true };
return global.TarinaiItemDecaySystem.update(item, dt, worldRef) || { done: false };
}
global.TarinaiItemDecayLifecycleStep = Object.freeze({ update });
})(typeof window !== "undefined" ? window : globalThis);