diff --git a/assets/script/game/map/MissionHeroComp.ts b/assets/script/game/map/MissionHeroComp.ts index 21bc92a3..46d160b8 100644 --- a/assets/script/game/map/MissionHeroComp.ts +++ b/assets/script/game/map/MissionHeroComp.ts @@ -54,19 +54,16 @@ export class MissionHeroComp extends CCComp { // ======================== 常量 ======================== /** - * 英雄登场占位点: - * - 从 x=-300 开始,每个点位间隔 60(x 向右递增表示更靠前)。 - * - 分配规则:近战优先靠前(靠近 0 的高索引),远程/中程优先靠后(低索引)。 + * 英雄登场占位点(固定 3 列): + * - index 0/1/2 分别对应 x=-320/-260/-200。 + * - 分配规则:近战优先靠前(x 更大),远程/中程优先靠后(x 更小); + * 同类型按召唤先后从该类型的一侧开始依次填充。 */ - public static readonly HERO_POSITIONS: Vec3[] = (() => { - const startX = -300; - const step = 60; - const positions: Vec3[] = []; - for (let i = 0; i < FightSet.HERO_MAX_NUM; i++) { - positions.push(v3(startX + i * step, BoxSet.GAME_LINE, 0)); - } - return positions; - })(); + public static readonly HERO_POSITIONS: Vec3[] = [ + v3(-320, BoxSet.GAME_LINE, 0), + v3(-260, BoxSet.GAME_LINE, 0), + v3(-200, BoxSet.GAME_LINE, 0), + ]; /** 英雄出生时的掉落高度(从空中落到地面的像素差) */ private static readonly HERO_DROP_HEIGHT = 260 @@ -218,8 +215,8 @@ export class MissionHeroComp extends CCComp { // 近战优先靠前(x 更大,索引更大);远程/中程优先靠后(x 更小,索引更小) const slotPriority = heroType === HType.Melee - ? [9, 8, 7, 6, 5, 4, 3, 2, 1, 0] - : [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]; + ? [2, 1, 0] + : [0, 1, 2]; for (const idx of slotPriority) { if (!occupied.has(idx) && MissionHeroComp.HERO_POSITIONS[idx]) { return idx;