e
This commit is contained in:
parent
f657b6a4a4
commit
d163ceb291
76 changed files with 1385 additions and 524 deletions
|
|
@ -64,9 +64,11 @@
|
|||
|
||||
function emitEffect(worldRef, type, x, y, options = {}) {
|
||||
if (!worldRef?.effects) return false;
|
||||
if (typeof worldRef.queueEffect === "function") return Boolean(worldRef.queueEffect(type, x, y, options));
|
||||
if (global.TarinaiPerf?.visualLevel?.("effects", "high") === "off") return false;
|
||||
const EffectCtor = global.TarinaiEffect || (typeof Effect === "function" ? Effect : null);
|
||||
if (typeof EffectCtor !== "function") return false;
|
||||
worldRef.effects.push(new EffectCtor(type, x, y, options));
|
||||
worldRef.queueEffect?.(type, x, y, options);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue