fea: 优化死亡特效

This commit is contained in:
cancerai committed 2026-10-24 02:35:03 +08:00
1 parent afe2f64b9b
commit e7200989ab
9 files changed
+373 -94

No files matched your search

+2 -1
View File
@@ -37,7 +37,8 @@ for (const d of LEVELS) {
const last = saves[saves.length - 1];
const want = { x: last.x + last.w / 2 - P.w / 2, y: last.y + last.h - P.h };
const spawn = L.spawn;
P.kill();
P.kill(); // 死亡后不再自动重生(新语义:定格等待手动重生)
P.respawn(); // 模拟玩家按 R 手动重生,应回到最后一个存档点
for (let i = 0; i < 45; i++) { L.update(1, P, null); P.update(1); Input.endFrame(); }
const dx = Math.abs(P.x - want.x), dy = Math.abs(P.y - want.y);
const backToStart = Math.abs(P.x - spawn.x) < 3 && Math.abs(P.y - spawn.y) < 3;