fix: 刺放置方向问题
This commit is contained in:
1 parent
6ba47dfd88
commit
bf0f065432
8 files changed
+580
-120
No files matched your search
+5
-1
@@ -127,8 +127,12 @@ export class Level {
|
||||
}
|
||||
if (s.type === 'warp') {
|
||||
const cfg = this.warpSrc[e.idx] || {};
|
||||
// 自制多面地图:门的目标直接挂在 door.to 上
|
||||
// door.to 可以是跨面 {face, door}(自制门),或原有 'spawn' / {x,y}(内置同关传送)
|
||||
const door = (this.data.doors || []).find(d => d.tx === s.tx && d.ty === s.ty);
|
||||
e.doorId = door ? door.id : e.idx;
|
||||
e.pair = cfg.pair !== undefined ? cfg.pair : (e.idx % 2 === 0 ? e.idx + 1 : e.idx - 1);
|
||||
e.to = cfg.to || null; // {x,y} 绝对像素 / 'spawn'
|
||||
e.to = (door && door.to) ? door.to : (cfg.to || null);
|
||||
e.cool = 0;
|
||||
e.hidden = !!cfg.hidden;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user